Skip to content

Commit fcf9182

Browse files
committedNov 14, 2021
version bump 0.17.4: Lotus WK3 workbook writer
1 parent 9e9e4bc commit fcf9182

34 files changed

+3804
-639
lines changed
 

‎.spelling

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ SQLite
4949
SystemJS
5050
VueJS
5151
WebSQL
52+
WK_
5253
iOS
5354
nodejs
5455
node.js

‎CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ This log is intended to keep track of backwards-incompatible changes, including
44
but not limited to API changes and file location changes. Minor behavioral
55
changes may not be included if they are not expected to break existing code.
66

7+
## v0.17.4
8+
9+
* CLI script moved to `xlsx-cli` package
10+
711
## v0.17.3
812

913
* `window.XLSX` explicit assignment to satiate LWC

‎README.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -1381,11 +1381,12 @@ prefixed with an apostrophe `'`, consistent with Excel's formula bar display.
13811381
| RC-style strings | XLML and plain text |||
13821382
| BIFF Parsed formulae | XLSB and all XLS formats || |
13831383
| OpenFormula formulae | ODS/FODS/UOS |||
1384+
| Lotus Parsed formulae | All Lotus WK_ formats || |
13841385

13851386
Since Excel prohibits named cells from colliding with names of A1 or RC style
13861387
cell references, a (not-so-simple) regex conversion is possible. BIFF Parsed
1387-
formulae have to be explicitly unwound. OpenFormula formulae can be converted
1388-
with regular expressions.
1388+
formulae and Lotus Parsed formulae have to be explicitly unwound. OpenFormula
1389+
formulae can be converted with regular expressions.
13891390
</details>
13901391

13911392
#### Column Properties
@@ -1776,6 +1777,7 @@ The exported `read` and `readFile` functions accept an options argument:
17761777
|`sheets` | | If specified, only parse specified sheets ** |
17771778
|`PRN` | false | If true, allow parsing of PRN files ** |
17781779
|`xlfn` | false | If true, preserve `_xlfn.` prefixes in formulae ** |
1780+
|`FS` | | DSV Field Separator override |
17791781

17801782
- Even if `cellNF` is false, formatted text will be generated and saved to `.w`
17811783
- In some cases, sheets may be parsed even if `bookSheets` is false.
@@ -1939,12 +1941,14 @@ output formats. The specific file type is controlled with `bookType` option:
19391941
| `xlml` | `.xls` | none | multi | Excel 2003-2004 (SpreadsheetML) |
19401942
| `ods` | `.ods` | ZIP | multi | OpenDocument Spreadsheet |
19411943
| `fods` | `.fods` | none | multi | Flat OpenDocument Spreadsheet |
1944+
| `wk3` | `.wk3` | none | single | Lotus Workbook (WK3) |
19421945
| `csv` | `.csv` | none | single | Comma Separated Values |
19431946
| `txt` | `.txt` | none | single | UTF-16 Unicode Text (TXT) |
19441947
| `sylk` | `.sylk` | none | single | Symbolic Link (SYLK) |
19451948
| `html` | `.html` | none | single | HTML Document |
19461949
| `dif` | `.dif` | none | single | Data Interchange Format (DIF) |
19471950
| `dbf` | `.dbf` | none | single | dBASE II + VFP Extensions (DBF) |
1951+
| `wk1` | `.wk1` | none | single | Lotus Worksheet (WK1) |
19481952
| `rtf` | `.rtf` | none | single | Rich Text Format (RTF) |
19491953
| `prn` | `.prn` | none | single | Lotus Formatted Text |
19501954
| `eth` | `.eth` | none | single | Ethercalc Record Format (ETH) |
@@ -2481,7 +2485,8 @@ Despite the library name `xlsx`, it supports numerous spreadsheet file formats:
24812485
| Flat XML ODF Spreadsheet (FODS) |||
24822486
| Uniform Office Format Spreadsheet (标文通 UOS1/UOS2) || |
24832487
| dBASE II/III/IV / Visual FoxPro (DBF) |||
2484-
| Lotus 1-2-3 (WKS/WK1/WK2/WK3/WK4/123) || |
2488+
| Lotus 1-2-3 (WK1/WK3) |||
2489+
| Lotus 1-2-3 (WKS/WK2/WK4/123) || |
24852490
| Quattro Pro Spreadsheet (WQ1/WQ2/WB1/WB2/WB3/QPW) || |
24862491
| **Other Common Spreadsheet Output Formats** |:-----:|:-----:|
24872492
| HTML Tables |||
@@ -2619,6 +2624,10 @@ The Lotus formats consist of binary records similar to the BIFF structure. Lotus
26192624
did release a specification decades ago covering the original WK1 format. Other
26202625
features were deduced by producing files and comparing to Excel support.
26212626

2627+
Generated WK1 worksheets are compatible with Lotus 1-2-3 R2 and Excel 5.0.
2628+
2629+
Generated WK3 workbooks are compatible with Lotus 1-2-3 R9 and Excel 5.0.
2630+
26222631
</details>
26232632

26242633
#### Quattro Pro (WQ1/WQ2/WB1/WB2/WB3/QPW)

‎bin/xlsx.njs

+3-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ program
4343
.option('-i, --xla', 'emit XLA to <sheetname> or <file>.xla')
4444
.option('-6, --xlml', 'emit SSML to <sheetname> or <file>.xls (2003 XML)')
4545
.option('-T, --fods', 'emit FODS to <sheetname> or <file>.fods (Flat ODS)')
46+
.option('--wk3', 'emit WK3 to <sheetname> or <file>.txt (Lotus WK3)')
4647

4748
.option('-S, --formulae', 'emit list of values and formulae')
4849
.option('-j, --json', 'emit formatted JSON (all fields text)')
@@ -90,7 +91,8 @@ var workbook_formats = [
9091
['xla', 'xla', 'xla'],
9192
['biff5', 'biff5', 'xls'],
9293
['ods', 'ods', 'ods'],
93-
['fods', 'fods', 'fods']
94+
['fods', 'fods', 'fods'],
95+
['wk3', 'wk3', 'wk3']
9496
];
9597
var wb_formats_2 = [
9698
['xlml', 'xlml', 'xls']

‎bits/01_version.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
XLSX.version = '0.17.3';
1+
XLSX.version = '0.17.4';

‎bits/29_xlsenum.js

+7-11
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ var DocSummaryPIDDSI = {
6666
/*::[*/0x1B/*::]*/: { n: 'ContentStatus', t: VT_STRING },
6767
/*::[*/0x1C/*::]*/: { n: 'Language', t: VT_STRING },
6868
/*::[*/0x1D/*::]*/: { n: 'Version', t: VT_STRING },
69-
/*::[*/0xFF/*::]*/: {}
69+
/*::[*/0xFF/*::]*/: {},
70+
/* [MS-OLEPS] 2.18 */
71+
/*::[*/0x80000000/*::]*/: { n: 'Locale', t: VT_UI4 },
72+
/*::[*/0x80000003/*::]*/: { n: 'Behavior', t: VT_UI4 },
73+
/*::[*/0x72627262/*::]*/: {}
7074
};
7175

7276
/* [MS-OSHARED] 2.3.3.2.1.1 Summary Information Property Set PIDSI */
@@ -90,21 +94,13 @@ var SummaryPIDSI = {
9094
/*::[*/0x11/*::]*/: { n: 'Thumbnail', t: VT_CF },
9195
/*::[*/0x12/*::]*/: { n: 'Application', t: VT_STRING },
9296
/*::[*/0x13/*::]*/: { n: 'DocSecurity', t: VT_I4 },
93-
/*::[*/0xFF/*::]*/: {}
94-
};
95-
96-
/* [MS-OLEPS] 2.18 */
97-
var SpecialProperties = {
97+
/*::[*/0xFF/*::]*/: {},
98+
/* [MS-OLEPS] 2.18 */
9899
/*::[*/0x80000000/*::]*/: { n: 'Locale', t: VT_UI4 },
99100
/*::[*/0x80000003/*::]*/: { n: 'Behavior', t: VT_UI4 },
100101
/*::[*/0x72627262/*::]*/: {}
101102
};
102103

103-
(function() {
104-
for(var y in SpecialProperties) if(Object.prototype.hasOwnProperty.call(SpecialProperties, y))
105-
DocSummaryPIDDSI[y] = SummaryPIDSI[y] = SpecialProperties[y];
106-
})();
107-
108104
var DocSummaryRE/*:{[key:string]:string}*/ = evert_key(DocSummaryPIDDSI, "n");
109105
var SummaryRE/*:{[key:string]:string}*/ = evert_key(SummaryPIDSI, "n");
110106

0 commit comments

Comments
 (0)
Please sign in to comment.