/** * XLSX - Node.js version with full functionality * * Extends XLSX with: * - readFile: Read from file path * - writeFile: Write to file path * - Constructor injects readFileAsync for filename-based media loading * * Inherited from XLSX (and narrowed to the Node `Workbook` type via the * `XLSXBase` generic): * - read: Read from stream * - write: Write to stream * - load: Load from buffer * - writeBuffer: Write to buffer (Uint8Array) * - addMedia: Supports buffer, base64, and filename (via readFileAsync) * * The `` type argument is what makes `wb.xlsx.load(buf)` / * `wb.xlsx.read(stream)` return the *Node* Workbook (which exposes * `xlsx.readFile` / `xlsx.writeFile`) instead of the browser base class. * Without the generic, the inherited methods would be typed against the * browser `Workbook` and Node consumers chaining off the returned value * would lose access to the Node-only file APIs — issue #160. */ import type { Workbook } from "../workbook.js"; import type { XlsxReadOptions, XlsxWriteOptions } from "./xlsx.browser.js"; import { XLSX as XLSXBase } from "./xlsx.browser.js"; import type { ReadableLike } from "../../stream/types.js"; declare class XLSX extends XLSXBase { constructor(workbook: Workbook); private static iterateZipEntries; read(stream: ReadableLike, options?: XlsxReadOptions): Promise; readFile(filename: string, options?: XlsxReadOptions): Promise; writeFile(filename: string, options?: XlsxWriteOptions): Promise; } export { XLSX };