Skip to content

ReadOptions

Options for reading/parsing workbook files

Interface: ReadOptions

Options for reading/parsing workbook files

Hierarchy

Extends:

  • CommonOptions
  • WorksheetCellBudgetOptions

Properties

WTF

optional

WTF: boolean

If true, throw errors on unexpected situations instead of silently recovering

bookVBA

optional

bookVBA: boolean

Reserved compatibility option. A true value is unsupported and throws XlsxError ("UNSUPPORTED").

cellDates

optional

cellDates: boolean

If true, store dates as Date objects instead of serial numbers

sheetStubs

optional

sheetStubs: boolean

If true, include stub cells for empty cells within the used range

cellStyles

optional

cellStyles: boolean

If true, include style/theme information on cells

password

optional

password: string

Password for encrypted workbooks; non-empty values are unsupported and throw XlsxError ("UNSUPPORTED")

maxWorksheetCells

optional

maxWorksheetCells: number

Maximum cumulative cell work per sheet. This counts explicit cells plus generated column, hyperlink, span, and export positions. XLSX reads default to 10,000,000; exports default to 1,000,000.

type

optional

type: "string" | "base64" | "buffer" | "array"

Input data type: "base64" for base64 string, "buffer" for Node Buffer, "array" for Uint8Array, "string" for plain text (CSV/HTML)

cellFormula

optional

cellFormula: boolean

If true, parse and store cell formulas

cellHTML

optional

cellHTML: boolean

If true, generate HTML representation of rich text

cellNF

optional

cellNF: boolean

If true, store the number format string on each cell

cellText

optional

cellText: boolean

If true, generate formatted text for each cell

dateNF

optional

dateNF: string

Override date format string (replaces default "m/d/yy" for format 14)

sheetRows

optional

sheetRows: number

Maximum row position to retain per sheet (0 = all rows)

bookDeps

optional

bookDeps: boolean

Reserved compatibility option. A true value is unsupported and throws XlsxError ("UNSUPPORTED").

bookFiles

optional

bookFiles: boolean

Reserved compatibility option. A true value is unsupported and throws XlsxError ("UNSUPPORTED").

bookProps

optional

bookProps: boolean

If true, only parse workbook properties (skip sheet data)

bookSheets

optional

bookSheets: boolean

If true, only parse sheet names (skip sheet data)

sheets

optional

sheets: string | number | (string | number)[]

Restrict parsing to specific sheets by index or name

nodim

optional

nodim: boolean

If true, ignore the stored worksheet dimension and recalculate the range from parsed cells, anchored at A1

xlfn

optional

xlfn: boolean

Reserved compatibility option. A true value is unsupported and throws XlsxError ("UNSUPPORTED").

FS

optional

FS: string

Field separator for plain-text input with type "string" (default: ","; use "\t" for TSV)

dense

optional

dense: boolean

If true, use dense (2D array) storage mode instead of sparse (object) mode

UTC

optional

UTC: boolean

If true, all dates are interpreted as UTC (no timezone adjustment)

maxZipEntries

optional

maxZipEntries: number

Maximum number of ZIP central-directory entries to parse

maxTotalUncompressedBytes

optional

maxTotalUncompressedBytes: number

Maximum total uncompressed ZIP payload size across file entries

maxEntryUncompressedBytes

optional

maxEntryUncompressedBytes: number

Maximum uncompressed ZIP payload size for a single file entry

maxXmlPartBytes

optional

maxXmlPartBytes: number

Maximum decoded XML part size

maxXmlTags

optional

maxXmlTags: number

Maximum number of raw XML tags in a single XML part

maxXmlNestingDepth

optional

maxXmlNestingDepth: number

Maximum XML element nesting depth in a single XML part

maxXmlTagLength

optional

maxXmlTagLength: number

Maximum number of characters in a single XML tag

maxXmlAttributesPerTag

optional

maxXmlAttributesPerTag: number

Maximum number of attributes in a single XML tag

maxSharedStringItems

optional

maxSharedStringItems: number

Maximum number of shared string entries to parse

maxWorksheetRows

optional

maxWorksheetRows: number

Maximum number of worksheet row elements or text records to scan

Source

src/types.ts:91


← Range | RowInfo →