From 71112700de85154b3b832fdec6c57ce37219a705 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Sun, 23 Oct 2022 21:28:03 -0400 Subject: [PATCH] 0.19.0 --- docz/docs/07-csf/03-sheet.md | 13 ++++++++++++- docz/docs/08-api/05-parse-options.md | 4 ++++ docz/version.js | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/docz/docs/07-csf/03-sheet.md b/docz/docs/07-csf/03-sheet.md index 4753134..b6f1845 100644 --- a/docz/docs/07-csf/03-sheet.md +++ b/docz/docs/07-csf/03-sheet.md @@ -15,7 +15,18 @@ Excel supports 4 different types of "sheets": Generic sheets are plain JavaScript objects. Each key that does not start with `!` is an `A1`-style address whose corresponding value is a cell object. -`sheet[address]` returns the cell object for the specified address. +### Cell Storage + +By default, the parsers and utility functions generate "sparse-mode" worksheet +objects. `sheet[address]` returns the cell object for the specified address. + +When the option `dense: true` is passed, parsers will generate a "dense-mode" +worksheet where cells are stored in an array of arrays. `sheet["!data"][R][C]` +returns the cell object at row `R` and column `C` (zero-indexed values). + +When processing small worksheets in older environments, sparse worksheets are +more efficient than dense worksheets. In newer browsers, when dealing with very +large worksheets, dense sheets use less memory and tend to be more efficient. ### Sheet Properties diff --git a/docz/docs/08-api/05-parse-options.md b/docz/docs/08-api/05-parse-options.md index 7848cac..c2e3332 100644 --- a/docz/docs/08-api/05-parse-options.md +++ b/docz/docs/08-api/05-parse-options.md @@ -16,6 +16,7 @@ The read functions accept an options argument: | :---------- | ------: | :--------------------------------------------------- | |`type` | | Input data encoding (see Input Type below) | |`raw` | false | If true, plain text parsing will not parse values ** | +|`dense` | false | If true, use a dense worksheet representation ** | |`codepage` | | If specified, use code page when appropriate ** | |`cellFormula`| true | Save formulae to the .f field | |`cellHTML` | true | Parse rich text and save HTML to the `.h` field | @@ -68,6 +69,9 @@ The read functions accept an options argument: - `WTF` is mainly for development. By default, the parser will suppress read errors on single worksheets, allowing you to read from the worksheets that do parse properly. Setting `WTF:true` forces those errors to be thrown. +- By default, "sparse" mode worksheets are generated. Individual cells are + accessed by indexing the worksheet object with an A1-style address. "dense" + worksheets store cells in an array of arrays at `sheet["!data"]`. ### Input Type diff --git a/docz/version.js b/docz/version.js index c8e2d5d..1bd1ba5 100644 --- a/docz/version.js +++ b/docz/version.js @@ -1,2 +1,2 @@ -const current = "0.18.12"; +const current = "0.19.0"; export default current;