@@ -121,6 +121,7 @@ Community Translations of this README:
121
121
* [ Other Workbook Formats] ( #other-workbook-formats )
122
122
+ [ Lotus 1-2-3 (WKS/WK1/WK2/WK3/WK4/123)] ( #lotus-1-2-3-wkswk1wk2wk3wk4123 )
123
123
+ [ 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 )
124
125
+ [ OpenDocument Spreadsheet (ODS/FODS)] ( #opendocument-spreadsheet-odsfods )
125
126
+ [ Uniform Office Spreadsheet (UOS1/2)] ( #uniform-office-spreadsheet-uos12 )
126
127
* [ Other Single-Worksheet Formats] ( #other-single-worksheet-formats )
@@ -465,7 +466,7 @@ Using `Blob#arrayBuffer`:
465
466
466
467
``` js
467
468
async function handleFileAsync (e ) {
468
- const file = evt .target .files [0 ];
469
+ const file = e .target .files [0 ];
469
470
const data = await file .arrayBuffer ();
470
471
const workbook = XLSX .read (data);
471
472
@@ -1836,7 +1837,7 @@ file but Excel will know how to handle it. This library applies similar logic:
1836
1837
1837
1838
| Byte 0 | Raw File Type | Spreadsheet Types |
1838
1839
| :-------| :--------------| :----------------------------------------------------|
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 |
1840
1841
| ` 0x09 ` | BIFF Stream | BIFF 2/3/4/5 |
1841
1842
| ` 0x3C ` | XML/HTML | SpreadsheetML / Flat ODS / UOS1 / HTML / plain text |
1842
1843
| ` 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:
1853
1854
DBF files are detected based on the first byte as well as the third and fourth
1854
1855
bytes (corresponding to month and day of the file date)
1855
1856
1857
+ Works for Windows files are detected based on the BOF record with type ` 0xFF `
1858
+
1856
1859
Plain text format guessing follows the priority order:
1857
1860
1858
1861
| Format | Test |
@@ -2488,6 +2491,8 @@ Despite the library name `xlsx`, it supports numerous spreadsheet file formats:
2488
2491
| Lotus 1-2-3 (WK1/WK3) | ✔ | ✔ |
2489
2492
| Lotus 1-2-3 (WKS/WK2/WK4/123) | ✔ | |
2490
2493
| 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) | ✔ | |
2491
2496
| ** Other Common Spreadsheet Output Formats** | :-----:| :-----:|
2492
2497
| HTML Tables | ✔ | ✔ |
2493
2498
| Rich Text Format tables (RTF) | | ✔ |
@@ -2505,6 +2510,8 @@ range limits will be silently truncated:
2505
2510
| Excel 4.0 (XLS BIFF4) | IV16384 | 256 | 16384 |
2506
2511
| Excel 3.0 (XLS BIFF3) | IV16384 | 256 | 16384 |
2507
2512
| 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 |
2508
2515
2509
2516
Excel 2003 SpreadsheetML range limits are governed by the version of Excel and
2510
2517
are not enforced by the writer.
@@ -2641,6 +2648,27 @@ BIFF8 XLS.
2641
2648
2642
2649
</details >
2643
2650
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
+
2644
2672
#### OpenDocument Spreadsheet (ODS/FODS)
2645
2673
2646
2674
<details >
0 commit comments