appendSheet
On this page
Append a worksheet to the end of a workbook's sheet list.
If no name is provided, generates one automatically ("Sheet1", "Sheet2", ...).
When roll is true and the name already exists, appends an incrementing
numeric suffix to make it unique (e.g. "Sheet1" -> "Sheet2").
appendSheet(wb: WorkBook, ws: WorkSheet, name?: string, roll?: boolean): string
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
wb | WorkBook | Yes | The workbook to add the sheet to |
ws | WorkSheet | Yes | The worksheet to append |
name | string | No | Optional sheet name; auto-generated if omitted |
roll | boolean | No | If true, auto-increment the name suffix on collision instead of throwing |
Returns
string
The final sheet name that was used