Hi, i try to record office script to filter out or hide rows based on the cell value.
i have column "T" containing formula resulting in 0 or 1, id like to run this daily and hide everything containing 0, and leave everything with 1 visible.
If i record script and play with the filter, i get as below:
function main(workbook: ExcelScript.Workbook) {
let selectedSheet = workbook.getActiveWorksheet();// Clear auto filter on selectedSheetselectedSheet.getAutoFilter().clearCriteria();// Apply values filter on column T (index 20)selectedSheet.getAutoFilter().apply(20, {filterOn: ExcelScript.FilterOn.values,values: ["1"],criteria: [{operator: ExcelScript.Operator.greaterOrEqual,value: 100}]});}
it results in error:
Line 8: Cannot read properties of undefined (reading 'greaterOrEqual')
similar thing comes when i try to script hiding rows.
Can't really understand how it can result in errors if i record this script with built in tools?
Thanks in advance