Skip to content

Commit 2e32611

Browse files
committed
version bump 0.16.6: xlfn option
1 parent 3b589f0 commit 2e32611

22 files changed

+134
-82
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,6 +1685,7 @@ The exported `read` and `readFile` functions accept an options argument:
16851685
|`WTF` | false | If true, throw errors on unexpected file features ** |
16861686
|`sheets` | | If specified, only parse specified sheets ** |
16871687
|`PRN` | false | If true, allow parsing of PRN files ** |
1688+
|`xlfn` | false | If true, preserve `_xlfn.` prefixes in formulae ** |
16881689

16891690
- Even if `cellNF` is false, formatted text will be generated and saved to `.w`
16901691
- In some cases, sheets may be parsed even if `bookSheets` is false.
@@ -1711,6 +1712,8 @@ The exported `read` and `readFile` functions accept an options argument:
17111712
- `PRN` affects parsing of text files without a common delimiter character.
17121713
- Currently only XOR encryption is supported. Unsupported error will be thrown
17131714
for files employing other encryption methods.
1715+
- Newer Excel functions are serialized with the `_xlfn.` prefix, hidden from the
1716+
user. SheetJS will strip `_xlfn.` normally. The `xlfn` option preserves them.
17141717
- WTF is mainly for development. By default, the parser will suppress read
17151718
errors on single worksheets, allowing you to read from the worksheets that do
17161719
parse properly. Setting `WTF:true` forces those errors to be thrown.

bits/01_version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
XLSX.version = '0.16.5';
1+
XLSX.version = '0.16.6';

bits/67_wsxml.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,14 +352,17 @@ return function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, th
352352
if(opts.cellFormula) {
353353
if((cref=d.match(match_f))!= null && /*::cref != null && */cref[1] !== '') {
354354
/* TODO: match against XLSXFutureFunctions */
355-
p.f=_xlfn(unescapexml(utf8read(cref[1])));
355+
p.f=unescapexml(utf8read(cref[1]));
356+
if(!opts.xlfn) p.f = _xlfn(p.f);
356357
if(/*::cref != null && cref[0] != null && */cref[0].indexOf('t="array"') > -1) {
357358
p.F = (d.match(refregex)||[])[1];
358359
if(p.F.indexOf(":") > -1) arrayf.push([safe_decode_range(p.F), p.F]);
359360
} else if(/*::cref != null && cref[0] != null && */cref[0].indexOf('t="shared"') > -1) {
360361
// TODO: parse formula
361362
ftag = parsexmltag(cref[0]);
362-
sharedf[parseInt(ftag.si, 10)] = [ftag, _xlfn(unescapexml(utf8read(cref[1]))), tag.r];
363+
var ___f = unescapexml(utf8read(cref[1]));
364+
if(!opts.xlfn) ___f = _xlfn(___f);
365+
sharedf[parseInt(ftag.si, 10)] = [ftag, ___f, tag.r];
363366
}
364367
} else if((cref=d.match(/<f[^>]*\/>/))) {
365368
ftag = parsexmltag(cref[0]);

dist/xlsx.core.min.js

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/xlsx.core.min.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/xlsx.extendscript.js

Lines changed: 10 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/xlsx.full.min.js

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/xlsx.full.min.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/xlsx.js

Lines changed: 10 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/xlsx.min.js

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)