Appearance
Function: hideWorksheet()
ts
function hideWorksheet(workbook: Workbook, identifier: string | number | RegExp): void;Defined in: src/excel/excel.tsx:322
Hide a worksheet in the workbook. Accepts a name, 1-based index, or RegExp. Does nothing if the worksheet is not found or if hiding it would leave no visible sheets.
Parameters
| Parameter | Type | Description |
|---|---|---|
workbook | Workbook | The ExcelJS workbook instance. |
identifier | string | number | RegExp | A worksheet name, 1-based index, or RegExp pattern. |
Returns
void
Example
ts
hideWorksheet(workbook, 'Scratch');
hideWorksheet(workbook, 2);
hideWorksheet(workbook, /^Draft/);