there are sheets in my workbook that can either be titled "PL -Flat" or can be titled "FLAT"
this is the code that I have been using for the PL -Flat sheets, but I would prefer to use an if statement so I could select either of these sheets because the remaining code is the same between both sheets. There are also instances where both of these sheets are present. open minded to multiple ways to solve this problem
function main(workbook: ExcelScript.Workbook) {
// Select the worksheet named "PL -FLAT"
let flatSheet = workbook.getWorksheet('PL -FLAT');
flatSheet.activate();
i've tried using the ?
operator and writing an if
statement unsuccessfully