Bug 65510 - Add support for XLSB Short Cell Records
Summary: Add support for XLSB Short Cell Records
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: unspecified
Hardware: PC Mac OS X 10.1
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-19 06:32 UTC by Sheet JS
Modified: 2021-10-09 16:21 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sheet JS 2021-08-19 06:32:18 UTC
XLSB supports a set of undocumented record types (12-18) which are "short" versions of other cell records.  The short records do not specify a column index.  They assume placement adjacent to the previous cell.


Placement logic: for example, if a BrtCellBlank specifies column D and is followed by a record of type 16 (short BrtCellReal), the new cell will be in column E.


Storage: To explain the file layout, record type 13 is a short form of BrtCellRk (record type 2).  BrtCellRk is a 12 byte structure:

```
column index (4 bytes)
style index (3 bytes)
flags (1 byte)
value stored as RkNumber (4 bytes)
```

The short form is an 8 byte structure:

```
style index (3 bytes)
flags (1 byte)
value stored as RkNumber (4 bytes)
```


Documentation: Not even the 1.0 MS-XLSB spec mentions those records :( 
 https://oss.sheetjs.com/notes/xlsb_short_records/#records is a small table noting the corresponding records for those record types.

There are two sample files:

https://oss.sheetjs.com/notes/xlsb_short_records/brt_sst.xlsb includes short records for the 5 non-string record types as well as short BrtCellIsst (shared string table)

https://oss.sheetjs.com/notes/xlsb_short_records/brt_str.xlsb includes short records for the 5 non-string record types as well as short BrtCellSt (inline strings)
Comment 1 PJ Fanning 2021-08-19 08:25:04 UTC
Thanks for the detailed report. I'm afraid that xlsb is not a priority for most people in the POI community (because this format is not widely used). This is an open source project and if you are passionate about the xlsb format, code submissions are always welcome.