Forum Discussion
javifelices
Sep 24, 2023Copper Contributor
Filter cells that have notes
Good morning everyone and thanks for your attention. I have an online Excel with a series of conditional filters, and I wanted a filter for cells that have a note. In the desktop version, I have...
JKPieterse
Sep 25, 2023Silver Contributor
javifelices The script below filters a table named TB_Test (on Sheet2), for cells in column "Summary" containing a comment:
function main(workbook: ExcelScript.Workbook) {
// Your code here
let tableCells = workbook.getWorksheet("Sheet2").getTable("TB_Test").getColumnByName("Summary").getRangeBetweenHeaderAndTotal();
let cellCount = tableCells.getRowCount();
let allComments = workbook.getComments();
let commentCell: ExcelScript.Range;
tableCells.setRowHidden(true);
for (let i = 0; i < allComments.length; i++) {
try {
let commentCell = tableCells.getIntersection(allComments[i].getLocation());
console.log(commentCell.getAddress());
commentCell.getEntireRow().setRowHidden(false);
} catch {}
}
}
javifelices
Sep 26, 2023Copper Contributor
Thank you very much for your promptness.
Reviewing the configuration, the administrator does not allow execution of scripts and so on, we will see and study other options.
Best regards and thanks.
Reviewing the configuration, the administrator does not allow execution of scripts and so on, we will see and study other options.
Best regards and thanks.
- SergeiBaklanSep 26, 2023Diamond Contributor
As for me that's bit strange. Preventing Office Script is practically the same as preventing of formulae execution within Excel.