Skip to content

Function: workbookToMwFile()

ts
function workbookToMwFile(workbook: Workbook, name?: string): Promise<MwFile>;

Defined in: packages/excel-tools/lib/excel.d.ts:139

Convert an ExcelJS Workbook to an MwFile.

Parameters

ParameterTypeDescription
workbookWorkbookThe ExcelJS Workbook to convert.
name?stringThe 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