My workbook contains sheets that may have the title "PL -Flat" or simply "FLAT"
I currently have code specifically for the "PL -Flat" sheets, but I want to use an if statement so I can choose between either sheet since the rest of the code is identical for both. Sometimes, both types of sheets are present in the workbook. I am open to various solutions to address this issue.
function main(workbook: ExcelScript.Workbook) {
// Select the worksheet named "PL -FLAT"
let flatSheet = workbook.getWorksheet('PL -FLAT');
flatSheet.activate();
I've attempted to use the ternary operator (?) and write an if statement without success