Hello,
Im trying to display only filtered data table as ouput from excel report. im sending the script parameters to add as a dynamic filter to the script.
i have written office scripts to get the filtered data:
function main(workbook: ExcelScript.Workbook, FilterName:string) {
let table1 = workbook.getTable("Table1");
// Apply checked items filter on table Table1 column User Manager Name
table1.getColumnByName("User Manager Name")
.getFilter()
.applyValuesFilter(['FilterName']);
let Sheet = workbook.getActiveWorksheet();
let output =Sheet.getUsedRange().getVisibleView();
console.log(output);
when i use this script to run in power automate, it shows error as below:
We were unable to run the script. Please try again.
Runtime error: Line 11: {}
clientRequestId: b158e5b1-ab32-4189-be04-b49284ce9eb0
}