Does anyone have a solution for removing rows from a table in an office script that contain highlighted cells? I attempted to filter rows with highlighted cells using the recorder, but it showed 'This action is not yet recordable.' If you have a successful script that accomplishes this task, please share!
Current script:
function main(workbook: ExcelScript.Workbook) {
let conditionalFormatting: ExcelScript.ConditionalFormat;
let selectedSheet = workbook.getActiveWorksheet();
// Create preset criteria from range B:B on selectedSheet
conditionalFormatting = selectedSheet.getRange("B:B").addConditionalFormat(ExcelScript.ConditionalFormatType.presetCriteria);
conditionalFormatting.getPreset().getFormat().getFont().setColor("#9C0006");
conditionalFormatting.getPreset().getFormat().getFill().setColor("#FFC7CE");
conditionalFormatting.getPreset().setRule({criterion: ExcelScript.ConditionalFormatPresetCriterion.duplicateValues,});
}
I need to figure out how to filter or delete rows containing highlighted cells. Any help is appreciated!
I encountered an issue with the recorder saying the action is not yet recordable.