Appearance
Function: workbookToMwFile()
ts
function workbookToMwFile(workbook: Workbook, name?: string): Promise<MwFile>;Defined in: src/excel/excel.tsx:289
Convert an ExcelJS Workbook to an MwFile.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
workbook | Workbook | undefined | The ExcelJS Workbook to convert. |
name | string | 'workbook.xlsx' | The file name for the output. Defaults to 'workbook.xlsx'. |
Returns
Promise<MwFile>
A promise that resolves to the MwFile.
Example
ts
const file = await workbookToMwFile(workbook, 'monthly-report.xlsx');