Looking for ways to improve the performance of this script, as it currently takes 45 seconds to run. Any ideas?
function main(workbook: ExcelScript.Workbook) {
try {
const sheets = workbook.getWorksheets();
for (let sheet of sheets) {
const breakCol = sheet.getUsedRange(true);
const values = breakCol.getValues();
for (let row of values) {
for (let cell of row) {
breakCol.replaceAll("Pass", "", { completeMatch: true });
breakCol.replaceAll("Fail", "", { completeMatch: true });
breakCol.replaceAll("Skip", "", { completeMatch: true });
}
}
}
}
catch (e) {
}
}