Represents an Excel file and provides methods to interact with it.

Examples

Constructors

new ExcelFile()

new ExcelFile(data): ExcelFile

Creates an instance of ExcelFile.

Parameters

data: Buffer

The binary data of the Excel file.

Returns

ExcelFile

Methods

getContent()

getContent(sheetNames?): Promise<ExcelFileSheet[]>

Gets the content of specified sheets in the Excel file.

Parameters

sheetNames?: string[]

Optional. An array of sheet names to get content from.

Returns

Promise<ExcelFileSheet[]>

A promise that resolves to the content of the specified sheets.

Examples


fromUrl()

static fromUrl(url): Promise<ExcelFile>

Creates an ExcelFile instance from a URL.

Parameters

url: string

The URL of the Excel file.

Returns

Promise<ExcelFile>

A promise that resolves to an ExcelFile instance.

Examples