Expand description
Read-direction buffer serializer for bulk data transfer.
Converts a WorksheetXml and SharedStringTable into a compact binary
buffer that can be transferred to JavaScript as a single Buffer object,
avoiding per-cell napi object creation overhead.
Binary format (little-endian throughout):
HEADER (16 bytes)
magic: u32 = 0x534B5244 ("SKRD")
version: u16 = 1
row_count: u32 = occupied rows (sparse) or rectangle rows (dense)
col_count: u16 = number of columns
flags: u32 = bit 0: 1=sparse, 0=dense
ROW INDEX (row_count * 8 bytes; sparse omits unoccupied rows)
per row: row_number (u32) + offset (u32) into CELL DATA
offset = 0xFFFFFFFF for empty rows
STRING TABLE
count: u32
blob_size: u32
offsets: u32[count] (byte offset within blob)
blob: concatenated UTF-8 strings (blob_size bytes)
CELL DATA
Dense: row_count * col_count * 9 bytes
per cell: type (u8) + payload (8 bytes)
Sparse: variable length
per row: cell_count (u16) + cell_count * 11 bytes
per cell: col (u16) + type (u8) + payload (8 bytes)Structs§
- Formula
Cell - A formula cell as the row transfer buffers encode it.
Constants§
- CELL_
STRIDE - FLAG_
SPARSE - HEADER_
SIZE - MAGIC
- TYPE_
BOOL - TYPE_
DATE - TYPE_
EMPTY - TYPE_
ERROR - TYPE_
FORMULA - TYPE_
NUMBER - TYPE_
RICH_ STRING - TYPE_
STRING - VERSION
Functions§
- sheet_
formula_ cells - Lists the formula cells of a worksheet together with their cached results.
- sheet_
to_ raw_ buffer - Serialize a worksheet’s cell data into a compact binary buffer.
- sheet_
to_ raw_ buffer_ with_ date_ styles - Serialize a worksheet while promoting numeric cells that use date styles.
- sheet_
to_ raw_ buffer_ with_ date_ styles_ and_ options - Serializes a worksheet with date styles and an explicit traversal policy.
- sheet_
to_ raw_ buffer_ with_ options - Serializes a worksheet using an explicit finite traversal policy.