Skip to content

Commit

Permalink
version bump 0.17.4: Lotus WK3 workbook writer
Browse files Browse the repository at this point in the history
  • Loading branch information
SheetJSDev committed Nov 14, 2021
1 parent 9e9e4bc commit fcf9182
Show file tree
Hide file tree
Showing 34 changed files with 3,804 additions and 639 deletions.
1 change: 1 addition & 0 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ SQLite
SystemJS
VueJS
WebSQL
WK_
iOS
nodejs
node.js
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This log is intended to keep track of backwards-incompatible changes, including
but not limited to API changes and file location changes. Minor behavioral
changes may not be included if they are not expected to break existing code.

## v0.17.4

* CLI script moved to `xlsx-cli` package

## v0.17.3

* `window.XLSX` explicit assignment to satiate LWC
Expand Down
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1381,11 +1381,12 @@ prefixed with an apostrophe `'`, consistent with Excel's formula bar display.
| RC-style strings | XLML and plain text |||
| BIFF Parsed formulae | XLSB and all XLS formats || |
| OpenFormula formulae | ODS/FODS/UOS |||
| Lotus Parsed formulae | All Lotus WK_ formats || |

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

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

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

Generated WK1 worksheets are compatible with Lotus 1-2-3 R2 and Excel 5.0.

Generated WK3 workbooks are compatible with Lotus 1-2-3 R9 and Excel 5.0.

</details>

#### Quattro Pro (WQ1/WQ2/WB1/WB2/WB3/QPW)
Expand Down
4 changes: 3 additions & 1 deletion bin/xlsx.njs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ program
.option('-i, --xla', 'emit XLA to <sheetname> or <file>.xla')
.option('-6, --xlml', 'emit SSML to <sheetname> or <file>.xls (2003 XML)')
.option('-T, --fods', 'emit FODS to <sheetname> or <file>.fods (Flat ODS)')
.option('--wk3', 'emit WK3 to <sheetname> or <file>.txt (Lotus WK3)')

.option('-S, --formulae', 'emit list of values and formulae')
.option('-j, --json', 'emit formatted JSON (all fields text)')
Expand Down Expand Up @@ -90,7 +91,8 @@ var workbook_formats = [
['xla', 'xla', 'xla'],
['biff5', 'biff5', 'xls'],
['ods', 'ods', 'ods'],
['fods', 'fods', 'fods']
['fods', 'fods', 'fods'],
['wk3', 'wk3', 'wk3']
];
var wb_formats_2 = [
['xlml', 'xlml', 'xls']
Expand Down
2 changes: 1 addition & 1 deletion bits/01_version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
XLSX.version = '0.17.3';
XLSX.version = '0.17.4';
18 changes: 7 additions & 11 deletions bits/29_xlsenum.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ var DocSummaryPIDDSI = {
/*::[*/0x1B/*::]*/: { n: 'ContentStatus', t: VT_STRING },
/*::[*/0x1C/*::]*/: { n: 'Language', t: VT_STRING },
/*::[*/0x1D/*::]*/: { n: 'Version', t: VT_STRING },
/*::[*/0xFF/*::]*/: {}
/*::[*/0xFF/*::]*/: {},
/* [MS-OLEPS] 2.18 */
/*::[*/0x80000000/*::]*/: { n: 'Locale', t: VT_UI4 },
/*::[*/0x80000003/*::]*/: { n: 'Behavior', t: VT_UI4 },
/*::[*/0x72627262/*::]*/: {}
};

/* [MS-OSHARED] 2.3.3.2.1.1 Summary Information Property Set PIDSI */
Expand All @@ -90,21 +94,13 @@ var SummaryPIDSI = {
/*::[*/0x11/*::]*/: { n: 'Thumbnail', t: VT_CF },
/*::[*/0x12/*::]*/: { n: 'Application', t: VT_STRING },
/*::[*/0x13/*::]*/: { n: 'DocSecurity', t: VT_I4 },
/*::[*/0xFF/*::]*/: {}
};

/* [MS-OLEPS] 2.18 */
var SpecialProperties = {
/*::[*/0xFF/*::]*/: {},
/* [MS-OLEPS] 2.18 */
/*::[*/0x80000000/*::]*/: { n: 'Locale', t: VT_UI4 },
/*::[*/0x80000003/*::]*/: { n: 'Behavior', t: VT_UI4 },
/*::[*/0x72627262/*::]*/: {}
};

(function() {
for(var y in SpecialProperties) if(Object.prototype.hasOwnProperty.call(SpecialProperties, y))
DocSummaryPIDDSI[y] = SummaryPIDSI[y] = SpecialProperties[y];
})();

var DocSummaryRE/*:{[key:string]:string}*/ = evert_key(DocSummaryPIDDSI, "n");
var SummaryRE/*:{[key:string]:string}*/ = evert_key(SummaryPIDSI, "n");

Expand Down
Loading

0 comments on commit fcf9182

Please sign in to comment.