Skip to content

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

ParameterTypeDefault valueDescription
workbookWorkbookundefinedThe ExcelJS Workbook to convert.
namestring'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');

Matterway Assistant SDK Documentation