/** * Reading an `.xlsx` back, without a dependency (#355). * * Asymmetric with the writer on purpose. Writing uses stored entries and stays * synchronous; **reading cannot**, because a workbook that has been through * Excel comes back deflated. Verified against a real consulting template * rather than assumed: every part reports `Defl:N`, every cell is `t="s"` * against a `sharedStrings` part, and there is not one inline string left. So * the reader inflates through `DecompressionStream('deflate-raw')` - present * on Workers, in browsers and in Node 18+ - and resolves shared strings as * well as the inline ones this repository writes. * * Two details that are easy to miss and silently corrupt a row: * * - **Excel omits empty cells entirely.** A row is not a dense list, so a * cell's column comes from its `r` reference (`C7`) and nowhere else. * Reading positionally shifts every value after the first blank. * - **A zip carries directory entries** with zero length. They are not parts. */ export declare const decodeXmlText: (value: string) => string; /** `C7` -> 2. The letters are base-26 with no zero. */ export declare const columnIndexOf: (reference: string) => number; export interface ZipReadFailure { readonly ok: false; readonly reason: string; } /** * Every part in the archive, by path. Directory entries are skipped, and an * unknown compression method is refused rather than guessed at: a part read * wrongly would parse as an empty sheet, which is the silent failure this * whole feature exists to avoid. */ export declare const unzipEntries: (bytes: Uint8Array) => Promise<{ readonly ok: true; readonly entries: ReadonlyMap; } | ZipReadFailure>; export interface WorkbookRead { readonly ok: true; /** Sheet name to rows, in workbook order. */ readonly sheets: ReadonlyMap; } /** The workbook's sheets, by name. Async, because a saved workbook is deflated. */ export declare const readWorkbook: (bytes: Uint8Array) => Promise;