TX Sheet Control

OpenDocumentSpreadsheetLoadOptions Interface

Interface

Format settings used by openDocumentSpreadsheet in LoadOptions. This interface is a type-only declaration.

Properties

PropertyDescription
autoExpandWhether the editable worksheet may grow within its configured limits.
inflateRawOptional platform raw-DEFLATE callback. Return the expanded bytes; archive limits and expected-size checks still apply.
maxColumnsMaximum editable column capacity; range 1–16384.
maxEditableCellsMaximum projected stored cells; defaults to 1000000.
maxEntriesMaximum ZIP entry count, checked before expanding parts.
maxExpandedBytesMaximum total expanded ZIP bytes and repeated-text projection budget.
maxFileBytesMaximum accepted compressed file bytes.
maxPartBytesMaximum expanded bytes in one ZIP member.
maxRowsMaximum editable row capacity; range 1–1048576.
minColumnsMinimum initial column capacity, bounded by maxColumns.
minRowsMinimum initial row capacity, bounded by maxRows.
signalAbort signal checked before parsing and committing the document.

Example

import { StreamType, type Spreadsheet, type OpenDocumentSpreadsheetLoadOptions } from '@txtextcontrol/tx-sheet-control';

async function loadInvoice(editor: Spreadsheet, inputBytes: Uint8Array) {
    const options: OpenDocumentSpreadsheetLoadOptions = { maxEditableCells: 100000 };
    return editor.load(inputBytes, StreamType.OpenDocumentSpreadsheet, { openDocumentSpreadsheet: options });
}