Gets the index of a worksheet by name or RegExp pattern.
The ExcelJS workbook instance.
The worksheet name or pattern to search for.
The index of the worksheet or -1 if not found.
const index = getWorksheetIndex(workbook, 'Sheet1');const index = getWorksheetIndex(workbook, /Data/); Copy
const index = getWorksheetIndex(workbook, 'Sheet1');const index = getWorksheetIndex(workbook, /Data/);
Gets the index of a worksheet by name or RegExp pattern.