Skip to content

Function: renameWorksheet()

ts
function renameWorksheet(
   workbook: Workbook, 
   identifier: string | number, 
   newName: string): void;

Defined in: src/excel/excel.tsx:423

Rename a worksheet.

Parameters

ParameterTypeDescription
workbookWorkbookThe ExcelJS workbook instance.
identifierstring | numberThe worksheet index or name.
newNamestringThe new name for the worksheet.

Returns

void

Example

ts
renameWorksheet(workbook, 'Sheet1', 'Q4 Financials');
renameWorksheet(workbook, 0, 'Summary');

Matterway Assistant SDK Documentation