Copy Selected Cell Values Without using SNUtils
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi all,
if you don't have SNUtils and you want to use the command /copycells, here you have the code to do it from the browser's console.
//----------------- !Copy values of cells when it's not a link
var rowsSelected = document.querySelectorAll("td.list_edit_selected_cell");
var values = [];
rowsSelected.forEach(function (row) {
values.push(row['firstChild']['data'])
});
console.log(values);
console.log(values.toString());
//----------------- ! Copy values of cells when it's a link
var rowsSelected = document.querySelectorAll("td.list_edit_selected_cell");
var values = [];
rowsSelected.forEach(function (row) {
values.push(row['firstChild']['firstChild']['data'])
});
console.log(values);
console.log(values.toString());
Use the first part of the code when the column is not a reference field or first column and use the second part of the code when the column a reference field or the first column.
Steps:
Select the cells to copy
this column contains hyperlink, so I will use the second code.
Copy and paste the code in the browser's console.
Yokohama working!
#TricksAndTips
0 REPLIES 0