Streaming reads
readSheetRows
function
Stream a worksheet's rows from an .xlsx package, yielding each in sheet order without building the workbook model. Only rows the sheet actually declares are yielded, and within a row only its non-empty cells: a blank or style-only cell contributes nothing, matching the intent of a data read.
ts
function* readSheetRows(
data: Uint8Array,
options: ReadSheetRowsOptions = {},
): Generator<StreamedRow, void, undefined>;data: The raw.xlsxbytes.options: Sheet selector and the inflate bound (seeReadSheetRowsOptions). Throws:UnsupportedFormatErrorif the input is not a readable.xlsxpackage (a legacy.xls, a binary.xlsb, or an unrecognised/non-ZIP blob; branch on.format). Throws:PackageReadErrorif the input is a ZIP that cannot be unpacked: a corrupt or truncated archive, or one exceeding the inflate bound (a probable zip bomb). Throws:XlsxParseErrorif the package's workbook part declares no worksheets. Throws:RangeError/AuthoringErrorifoptions.sheetselects a position, or a name, that no worksheet has.
ReadSheetRowsOptions
interface
ts
interface ReadSheetRowsOptions extends ReadPackageOptions {
/**
* Which worksheet to stream: its name, or its 1-based position in the workbook. Defaults to the
* first sheet.
*/
readonly sheet?: string | number;
}readWorkbookStream
function
Stream every worksheet of an .xlsx package in workbook order, without building the workbook model. Each yielded StreamedSheet carries the declared sheet name and lets the caller stream that sheet's rows and read its hidden-column and merge summaries: the streaming analogue of walking readXlsx(data).worksheets.
ts
function* readWorkbookStream(
data: Uint8Array,
options: ReadPackageOptions = {},
): Generator<StreamedSheet, void, undefined>;data: The raw.xlsxbytes.options: The inflate bound (seeReadPackageOptions). Throws:UnsupportedFormatErrorif the input is not a readable.xlsxpackage (a legacy.xls, a binary.xlsb, or an unrecognised/non-ZIP blob; branch on.format). Throws:PackageReadErrorif the input is a ZIP that cannot be unpacked: a corrupt or truncated archive, or one exceeding the inflate bound (a probable zip bomb).