Skip to content

Commit d55b7a3

Browse files
committed
numbers OperationStorage iwa warning
1 parent ba94ffb commit d55b7a3

34 files changed

+39
-1086
lines changed

bits/40_harb.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,8 @@ var SYLK = /*#__PURE__*/(function() {
443443
}
444444
wb.Workbook.Names.push(nn);
445445
} break;
446+
// case 'NE': // ??
447+
// case 'NU': // ??
446448
case 'C': /* cell */
447449
var C_seen_K = false, C_seen_X = false, C_seen_S = false, C_seen_E = false, _R = -1, _C = -1, formula = "", cell_t = "z";
448450
for(rj=1; rj<record.length; ++rj) switch(record[rj].charAt(0)) {
@@ -476,6 +478,8 @@ var SYLK = /*#__PURE__*/(function() {
476478
case 'G': break; // unknown
477479
case 'R': _R = parseInt(record[rj].slice(1), 10)-1; break;
478480
case 'C': _C = parseInt(record[rj].slice(1), 10)-1; break;
481+
// case 'P': // ??
482+
// case 'D': // ??
479483
default: if(opts && opts.WTF) throw new Error("SYLK bad record " + rstr);
480484
}
481485
if(C_seen_K) {
@@ -529,6 +533,8 @@ var SYLK = /*#__PURE__*/(function() {
529533
if(Mval > 0) { rowinfo[R].hpt = Mval; rowinfo[R].hpx = pt2px(Mval); }
530534
else if(Mval === 0) rowinfo[R].hidden = true;
531535
break;
536+
// case 'K': // ??
537+
// case 'E': // ??
532538
default: if(opts && opts.WTF) throw new Error("SYLK bad record " + rstr);
533539
}
534540
if(F_seen < 1) next_cell_format = null; break;

bits/83_numbers.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,8 @@ function parse_numbers_iwa(cfb, opts) {
827827
cfb.FileIndex.forEach(function(s) {
828828
if (!s.name.match(/\.iwa$/))
829829
return;
830+
if (s.content[0] == 98)
831+
return;
830832
var o;
831833
try {
832834
o = decompress_iwa_file(s.content);

demos/README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ can be installed with Bash on Windows or with `cygwin`.
2626
- [`IndexedDB`](https://docs.sheetjs.com/docs/getting-started/demos/database#indexeddb)
2727

2828
**Frameworks**
29-
- [`angularjs`](angular/)
30-
- [`angular and ionic`](angular2/)
31-
- [`knockout`](knockout/)
32-
- [`meteor`](meteor/)
33-
- [`react, react-native, next`](react/)
34-
- [`vue 2.x, weex, nuxt`](vue/)
29+
- [`Angular.JS`](angular/)
30+
- [`Angular 2+ and Ionic`](angular2/)
31+
- [`Knockout`](https://docs.sheetjs.com/docs/getting-started/demos/legacy#knockoutjs)
32+
- [`Meteor`](meteor/)
33+
- [`React, React Native and NextJS`](react/)
34+
- [`VueJS, WeeX and NuxtJS`](vue/)
3535

3636
**Front-End UI Components**
3737
- [`canvas-datagrid`](datagrid/)
@@ -42,16 +42,16 @@ can be installed with Bash on Windows or with `cygwin`.
4242
**Platforms and Integrations**
4343
- [`NodeJS Server-Side Processing`](server/)
4444
- [`Deno`](deno/)
45-
- [`electron application`](electron/)
45+
- [`Electron`](electron/)
4646
- [`NW.js`](nwjs/)
47-
- [`Chrome / Chromium extensions`](chrome/)
47+
- [`Chrome / Chromium Extension`](chrome/)
4848
- [`Google Sheets API`](https://docs.sheetjs.com/docs/getting-started/demos/gsheet)
4949
- [`ExtendScript for Adobe Apps`](https://docs.sheetjs.com/docs/getting-started/demos/extendscript)
5050
- [`NetSuite SuiteScript`](https://docs.sheetjs.com/docs/getting-started/demos/netsuite)
5151
- [`SalesForce Lightning Web Components`](https://docs.sheetjs.com/docs/getting-started/demos/salesforce)
5252
- [`Excel JavaScript API`](https://docs.sheetjs.com/docs/getting-started/demos/excel)
5353
- [`Headless Automation`](https://docs.sheetjs.com/docs/getting-started/demos/headless)
54-
- [`Swift JSC and other engines`](altjs/)
54+
- [`Swift JSC and Other JavaScript Engines`](altjs/)
5555
- [`"serverless" functions`](function/)
5656
- [`databases and key/value stores`](database/)
5757
- [`Databases and Structured Data Stores`](https://docs.sheetjs.com/docs/getting-started/demos/database)
@@ -63,12 +63,15 @@ can be installed with Bash on Windows or with `cygwin`.
6363
- [`bun`](https://docs.sheetjs.com/docs/getting-started/demos/bundler#bun)
6464
- [`esbuild`](https://docs.sheetjs.com/docs/getting-started/demos/bundler#esbuild)
6565
- [`parcel`](https://docs.sheetjs.com/docs/getting-started/demos/bundler#parcel)
66-
- [`requirejs`](requirejs/)
67-
- [`rollup`](rollup/)
66+
- [`requirejs`](https://docs.sheetjs.com/docs/getting-started/demos/bundler#requirejs)
67+
- [`rollup`](https://docs.sheetjs.com/docs/getting-started/demos/bundler#rollup)
6868
- [`snowpack`](https://docs.sheetjs.com/docs/getting-started/demos/bundler#snowpack)
69+
- [`swc`](https://docs.sheetjs.com/docs/getting-started/demos/bundler#swc)
6970
- [`systemjs`](systemjs/)
7071
- [`typescript`](typescript/)
72+
- [`vite`](https://docs.sheetjs.com/docs/getting-started/demos/bundler#vite)
7173
- [`webpack 2.x`](webpack/)
74+
- [`wmr`](https://docs.sheetjs.com/docs/getting-started/demos/bundler#wmr)
7275

7376
Other examples are included in the [showcase](demos/showcase/).
7477

demos/deno/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

demos/deno/Makefile

Lines changed: 0 additions & 24 deletions
This file was deleted.

demos/deno/README.md

Lines changed: 7 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,13 @@
11
# Deno
22

3-
Deno is a runtime capable of running JS code including this library. There are
4-
a few different builds and recommended use cases as covered in this demo.
5-
6-
Due to ongoing stability and sync issues with the Deno registry, scripts should
7-
use [the CDN build](https://cdn.sheetjs.com/xlsx-latest/package/xlsx.mjs):
8-
9-
```js
10-
// @deno-types="https://cdn.sheetjs.com/xlsx-latest/package/types/index.d.ts"
11-
import * as XLSX from 'https://cdn.sheetjs.com/xlsx-latest/package/xlsx.mjs';
12-
13-
/* load the codepage support library for extended support with older formats */
14-
import * as cptable from 'https://cdn.sheetjs.com/xlsx-latest/package/dist/cpexcel.full.mjs';
15-
XLSX.set_cptable(cptable);
16-
```
17-
18-
19-
## Reading and Writing Files
20-
21-
In general, the command-line flag `--allow-read` must be passed to enable file
22-
reading. The flag `--allow-write` must be passed to enable file writing.
23-
24-
_Reading a File_
25-
26-
```ts
27-
const workbook = XLSX.readFile("test.xlsx");
28-
```
29-
30-
_Writing a File_
31-
32-
Older versions of the library did not properly detect features from Deno, so the
33-
`buffer` export would return an array of bytes. Since `Deno.writeFileSync` does
34-
not handle byte arrays, user code must generate a `Uint8Array` first:
35-
36-
```ts
37-
XLSX.writeFile(workbook, "test.xlsb");
38-
```
39-
40-
## Demos
41-
42-
**Complete Examples**
43-
44-
`sheet2csv.ts` is a complete command-line tool for generating CSV text from
45-
workbooks. Building the application is incredibly straightforward:
46-
47-
```bash
48-
$ deno compile -r --allow-read sheet2csv.ts # build the sheet2csv binary
49-
$ ./sheet2csv test.xlsx # print the first worksheet as CSV
50-
$ ./sheet2csv test.xlsx s5s # print worksheet "s5s" as CSV
51-
```
52-
53-
The [`server` demo](../server) includes a sample Deno server for parsing uploads
54-
and generating HTML TABLE previews.
55-
56-
57-
**Module Import Scenarios**
58-
59-
All demos attempt to read a file and write a new file. [`doit.ts`](./doit.ts)
60-
accepts the `XLSX` module as an argument.
61-
62-
- `x` imports the ESM build without the codepage library:
63-
64-
```ts
65-
// @deno-types="https://cdn.sheetjs.com/xlsx-latest/package/types/index.d.ts"
66-
import * as XLSX from 'https://cdn.sheetjs.com/xlsx-latest/package/xlsx.mjs';
67-
```
68-
69-
- `mjs` imports the ESM build and the associated codepage library:
70-
71-
```ts
72-
import * as XLSX from '../../xlsx.mjs';
73-
/* recommended for reading XLS files */
74-
import * as cptable from '../../dist/cptable.full.mjs';
75-
XLSX.set_cptable(cptable);
76-
```
77-
78-
- `node` uses the node compatibility layer:
79-
80-
```ts
81-
import { createRequire } from 'https://deno.land/std/node/module.ts';
82-
const require = createRequire(import.meta.url);
83-
const XLSX = require('../../');
84-
```
3+
Deno is a runtime capable of running JS code including this library.
854

5+
Demos have been integrated in the [documentation](https://docs.sheetjs.com) :
866

7+
- <https://docs.sheetjs.com/docs/installation/deno> installation
8+
- <https://docs.sheetjs.com/docs/example> writing JS data to a spreadsheet
9+
- <https://docs.sheetjs.com/docs/solutions/input> input strategies
10+
- <https://docs.sheetjs.com/docs/solutions/output> output strategies
11+
- <https://docs.sheetjs.com/docs/getting-started/demos/cli#deno> `deno compile`
8712

8813
[![Analytics](https://ga-beacon.appspot.com/UA-36810333-1/SheetJS/js-xlsx?pixel)](https://github.com/SheetJS/js-xlsx)

demos/deno/doit.ts

Lines changed: 0 additions & 43 deletions
This file was deleted.

demos/deno/mjs.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

demos/deno/node.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

demos/deno/sheet2csv.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)