# createWorkbook

Source: /xlsx-format/api-reference/functions/createworkbook

Create a new blank workbook, optionally containing an initial worksheet.

```ts
createWorkbook(ws?: WorkSheet, wsname?: string): WorkBook
```

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| ` ws ` | [` WorkSheet `](</xlsx-format/api-reference/interfaces/worksheet/>) | No | Optional worksheet to include as the first sheet |
| ` wsname ` | ` string ` | No | Name for the initial sheet (defaults to "Sheet1") |

## Returns

[` WorkBook `](</xlsx-format/api-reference/interfaces/workbook/>)

A new workbook object
