WriteOptions
Options for writing/serializing workbook files
Interface: WriteOptions
Options for writing/serializing workbook files
Hierarchy
Extends:
CommonOptionsSheet2CSVOptsSheet2HTMLOpts
Properties
WTF
optional
WTF: booleanIf true, throw errors on unexpected situations instead of silently recovering
bookVBA
optional
bookVBA: booleanReserved compatibility option. A true value is unsupported and throws XlsxError ("UNSUPPORTED").
cellDates
optional
cellDates: booleanIf true, store dates as Date objects instead of serial numbers
sheetStubs
optional
sheetStubs: booleanIf true, include stub cells for empty cells within the used range
cellStyles
optional
cellStyles: booleanIf true, include style/theme information on cells
password
optional
password: stringPassword for encrypted workbooks; non-empty values are unsupported and throw XlsxError ("UNSUPPORTED")
maxWorksheetCells
optional
maxWorksheetCells: numberMaximum 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"Output data type: "base64" for base64 string, "buffer" for Node Buffer, "array" for Uint8Array, "string" for plain text
bookType
optional
bookType: "xlsx" | "xlsm" | "csv" | "tsv" | "html"Output file format (default: "xlsx")
bookSST
optional
bookSST: booleanIf true, generate a Shared Strings Table for string deduplication
compression
optional
compression: booleanIf true, compress (deflate) ZIP entries
themeXLSX
optional
themeXLSX: stringReserved compatibility option. A non-empty value is unsupported and throws XlsxError ("UNSUPPORTED").
ignoreEC
optional
ignoreEC: booleanIf true, skip error-checking in the output
Props
optional
Props: PropertiesFile properties to embed in the output
FS
optional
FS: stringField separator (default: ",")
RS
optional
RS: stringRecord separator / row delimiter (default: "\n")
strip
optional
strip: booleanIf true, strip trailing field separators from each row
blankrows
optional
blankrows: booleanIf true, include blank rows (default: true)
skipHidden
optional
skipHidden: booleanIf true, skip hidden rows and columns
forceQuotes
optional
forceQuotes: booleanIf true, wrap all fields in quotes
rawNumbers
optional
rawNumbers: booleanIf true, emit raw numeric values instead of formatted text
escapeFormulae
optional
escapeFormulae: booleanIf not false, prefix formula-like text fields with a single quote
dateNF
optional
dateNF: NumberFormatOverride date format for date cells
dateOutput
optional
dateOutput: "iso"If "iso", emit date/datetime cells as machine-readable ISO-like strings
UTC
optional
UTC: booleanIf true, interpret dates as UTC
date1904
optional
date1904: booleanIf true, use 1904 date system for date serial numbers
id
optional
id: stringHTML id attribute for the table element
editable
optional
editable: booleanIf true, add contenteditable attribute to cells
header
optional
header: stringHTML to prepend before the table
footer
optional
footer: stringHTML to append after the table
sanitizeLinks
optional
sanitizeLinks: booleanIf not false, sanitize hyperlink targets to prevent XSS
Source
src/types.ts:149