OpenXLSX 1.12.1
Modern C++ Excel Library (Fork of OpenXLSX by Kenneth Troldal Balslev)
Loading...
Searching...
No Matches
OpenXLSX::XLStreamWriteOptions Struct Reference

Options for XLStreamWriter construction. More...

#include <XLStreamWriter.hpp>

Data Fields

XLStreamOpenMode openMode {XLStreamOpenMode::Auto}
size_t memorySpillThreshold {4 * 1024 * 1024}
 Spill in-memory buffer to a temp file after this many bytes.
std::filesystem::path tempDir {}
bool useSharedStrings {false}
size_t maxUniqueStrings {100000}
size_t maxSstBytes {64 * 1024 * 1024}
 Hard budget for unique shared-string payload bytes while streaming.
XLStreamDimensionMode dimensionMode {XLStreamDimensionMode::FixedSlot}
bool strictTableRegistration {true}
 When true, addTable registration failures on close throw instead of being swallowed.
size_t hybridHeaderSpillThreshold {4 * 1024 * 1024}
 Hybrid mode: if the serialized existing sheet XML exceeds this size, keep the pre-sheetData header on a temp file and stream it at first row (avoids a second full string peak). 0 = always keep header in memory. Default 4 MiB.
std::string defaultDateTimeFormat {"yyyy-mm-dd hh:mm:ss"}
 Default number format for XLStreamCell::withDateTime when no style is given.

Detailed Description

Options for XLStreamWriter construction.

Field Documentation

◆ defaultDateTimeFormat

std::string OpenXLSX::XLStreamWriteOptions::defaultDateTimeFormat {"yyyy-mm-dd hh:mm:ss"}

Default number format for XLStreamCell::withDateTime when no style is given.

Excel-compatible; created once via styles().findOrCreateStyle and cached.

◆ dimensionMode

XLStreamDimensionMode OpenXLSX::XLStreamWriteOptions::dimensionMode {XLStreamDimensionMode::FixedSlot}

◆ hybridHeaderSpillThreshold

size_t OpenXLSX::XLStreamWriteOptions::hybridHeaderSpillThreshold {4 * 1024 * 1024}

Hybrid mode: if the serialized existing sheet XML exceeds this size, keep the pre-sheetData header on a temp file and stream it at first row (avoids a second full string peak). 0 = always keep header in memory. Default 4 MiB.

◆ maxSstBytes

size_t OpenXLSX::XLStreamWriteOptions::maxSstBytes {64 * 1024 * 1024}

Hard budget for unique shared-string payload bytes while streaming.

When exceeded, further strings fall back to inlineStr (avoids SST OOM). 0 = unlimited (not recommended for large exports). Default 64 MiB.

◆ maxUniqueStrings

size_t OpenXLSX::XLStreamWriteOptions::maxUniqueStrings {100000}

◆ memorySpillThreshold

size_t OpenXLSX::XLStreamWriteOptions::memorySpillThreshold {4 * 1024 * 1024}

Spill in-memory buffer to a temp file after this many bytes.

0 = always use a temp file. Default 4 MiB (excelize uses 16 MiB).

◆ openMode

XLStreamOpenMode OpenXLSX::XLStreamWriteOptions::openMode {XLStreamOpenMode::Auto}

◆ strictTableRegistration

bool OpenXLSX::XLStreamWriteOptions::strictTableRegistration {true}

When true, addTable registration failures on close throw instead of being swallowed.

◆ tempDir

std::filesystem::path OpenXLSX::XLStreamWriteOptions::tempDir {}

Empty = system temp directory.

◆ useSharedStrings

bool OpenXLSX::XLStreamWriteOptions::useSharedStrings {false}

The documentation for this struct was generated from the following file: