I have been working with an Office script in Excel (in conjuction with Power Automate) to delete all rows from a table. I now need to modify this so it excludes rows which contain specific text in one of the columns.
Is anyone aware of a way to do this? For example, if a column C row contains "No", do not delete the row.
The script used to delete all rows in the table is below but unsure how to modify this to exclude certain rows
function main(workbook: ExcelScript.Workbook) {
let table = workbook.getTable("Table1");
let rowCount = table.getRowCount();
table.deleteRowsAt(0, rowCount);
}