Skip to content

Commit 0ddeba4

Browse files
committed
version bump 0.17.5
1 parent 5b25a43 commit 0ddeba4

23 files changed

+971
-267
lines changed

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ Community Translations of this README:
121121
* [Other Workbook Formats](#other-workbook-formats)
122122
+ [Lotus 1-2-3 (WKS/WK1/WK2/WK3/WK4/123)](#lotus-1-2-3-wkswk1wk2wk3wk4123)
123123
+ [Quattro Pro (WQ1/WQ2/WB1/WB2/WB3/QPW)](#quattro-pro-wq1wq2wb1wb2wb3qpw)
124+
+ [Works for DOS / Windows Spreadsheet (WKS/XLR)](#works-for-dos--windows-spreadsheet-wksxlr)
124125
+ [OpenDocument Spreadsheet (ODS/FODS)](#opendocument-spreadsheet-odsfods)
125126
+ [Uniform Office Spreadsheet (UOS1/2)](#uniform-office-spreadsheet-uos12)
126127
* [Other Single-Worksheet Formats](#other-single-worksheet-formats)
@@ -465,7 +466,7 @@ Using `Blob#arrayBuffer`:
465466

466467
```js
467468
async function handleFileAsync(e) {
468-
const file = evt.target.files[0];
469+
const file = e.target.files[0];
469470
const data = await file.arrayBuffer();
470471
const workbook = XLSX.read(data);
471472

@@ -1836,7 +1837,7 @@ file but Excel will know how to handle it. This library applies similar logic:
18361837

18371838
| Byte 0 | Raw File Type | Spreadsheet Types |
18381839
|:-------|:--------------|:----------------------------------------------------|
1839-
| `0xD0` | CFB Container | BIFF 5/8 or password-protected XLSX/XLSB or WQ3/QPW |
1840+
| `0xD0` | CFB Container | BIFF 5/8 or protected XLSX/XLSB or WQ3/QPW or XLR |
18401841
| `0x09` | BIFF Stream | BIFF 2/3/4/5 |
18411842
| `0x3C` | XML/HTML | SpreadsheetML / Flat ODS / UOS1 / HTML / plain text |
18421843
| `0x50` | ZIP Archive | XLSB or XLSX/M or ODS or UOS2 or plain text |
@@ -1853,6 +1854,8 @@ file but Excel will know how to handle it. This library applies similar logic:
18531854
DBF files are detected based on the first byte as well as the third and fourth
18541855
bytes (corresponding to month and day of the file date)
18551856

1857+
Works for Windows files are detected based on the BOF record with type `0xFF`
1858+
18561859
Plain text format guessing follows the priority order:
18571860

18581861
| Format | Test |
@@ -2488,6 +2491,8 @@ Despite the library name `xlsx`, it supports numerous spreadsheet file formats:
24882491
| Lotus 1-2-3 (WK1/WK3) |||
24892492
| Lotus 1-2-3 (WKS/WK2/WK4/123) || |
24902493
| Quattro Pro Spreadsheet (WQ1/WQ2/WB1/WB2/WB3/QPW) || |
2494+
| Works 1.x-3.x DOS / 2.x-5.x Windows Spreadsheet (WKS) || |
2495+
| Works 6.x-9.x Spreadsheet (XLR) || |
24912496
| **Other Common Spreadsheet Output Formats** |:-----:|:-----:|
24922497
| HTML Tables |||
24932498
| Rich Text Format tables (RTF) | ||
@@ -2505,6 +2510,8 @@ range limits will be silently truncated:
25052510
| Excel 4.0 (XLS BIFF4) | IV16384 | 256 | 16384 |
25062511
| Excel 3.0 (XLS BIFF3) | IV16384 | 256 | 16384 |
25072512
| Excel 2.0/2.1 (XLS BIFF2) | IV16384 | 256 | 16384 |
2513+
| Lotus 1-2-3 R2 - R5 (WK1/WK3/WK4) | IV8192 | 256 | 8192 |
2514+
| Lotus 1-2-3 R1 (WKS) | IV2048 | 256 | 2048 |
25082515

25092516
Excel 2003 SpreadsheetML range limits are governed by the version of Excel and
25102517
are not enforced by the writer.
@@ -2641,6 +2648,27 @@ BIFF8 XLS.
26412648

26422649
</details>
26432650

2651+
#### Works for DOS / Windows Spreadsheet (WKS/XLR)
2652+
2653+
<details>
2654+
<summary>(click to show)</summary>
2655+
2656+
All versions of Works were limited to a single worksheet.
2657+
2658+
Works for DOS 1.x - 3.x and Works for Windows 2.x extends the Lotus WKS format
2659+
with additional record types.
2660+
2661+
Works for Windows 3.x - 5.x uses the same format and WKS extension. The BOF
2662+
record has type `FF`
2663+
2664+
Works for Windows 6.x - 9.x use the XLR format. XLR is nearly identical to
2665+
BIFF8 XLS: it uses the CFB container with a Workbook stream. Works 9 saves the
2666+
exact Workbook stream for the XLR and the 97-2003 XLS export. Works 6 XLS
2667+
includes two empty worksheets but the main worksheet has an identical encoding.
2668+
XLR also includes a `WksSSWorkBook` stream similar to Lotus FM3/FMT files.
2669+
2670+
</details>
2671+
26442672
#### OpenDocument Spreadsheet (ODS/FODS)
26452673

26462674
<details>

bits/01_version.js

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

bits/27_csfutils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ function safe_decode_range(range/*:string*/)/*:Range*/ {
6161
}
6262
o.s.r = --idx;
6363

64-
if(i === len || range.charCodeAt(++i) === 58) { o.e.c=o.s.c; o.e.r=o.s.r; return o; }
64+
if(i === len || cc != 10) { o.e.c=o.s.c; o.e.r=o.s.r; return o; }
65+
++i;
6566

6667
for(idx = 0; i != len; ++i) {
6768
if((cc=range.charCodeAt(i)-64) < 1 || cc > 26) break;

bits/85_parsezip.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ function parse_zip(zip/*:ZIP*/, opts/*:?ParseOpts*/)/*:Workbook*/ {
6161
if(safegetzipfile(zip, 'objectdata.xml')) return parse_ods(zip, opts);
6262
/* Numbers */
6363
if(safegetzipfile(zip, 'Index/Document.iwa')) throw new Error('Unsupported NUMBERS file');
64+
if(!safegetzipfile(zip, '[Content_Types].xml')) {
65+
if(safegetzipfile(zip, 'index.xml.gz')) throw new Error('Unsupported NUMBERS 08 file');
66+
if(safegetzipfile(zip, 'index.xml')) throw new Error('Unsupported NUMBERS 09 file');
67+
throw new Error('Unsupported ZIP file');
68+
}
6469

6570
var entries = zipentries(zip);
6671
var dir = parse_ct((getzipstr(zip, '[Content_Types].xml')/*:?any*/));

dist/xlsx.core.min.js

Lines changed: 16 additions & 16 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.

0 commit comments

Comments
 (0)