@@ -177,10 +177,15 @@ $ bower install js-xlsx
177
177
178
178
** Deno**
179
179
180
- The [ ` sheetjs ` ] ( https://deno.land/x/sheetjs ) package is available on deno :
180
+ The [ ` sheetjs ` ] ( https://deno.land/x/sheetjs ) package is hosted by Deno :
181
181
182
182
``` ts
183
+ // @deno-types="https://deno.land/x/sheetjs/types/index.d.ts"
183
184
import * as XLSX from ' https://deno.land/x/sheetjs/xlsx.mjs'
185
+
186
+ /* load the codepage support library for extended support with older formats */
187
+ import * as cptable from ' https://deno.land/x/sheetjs/dist/cpexcel.full.mjs' ;
188
+ XLSX .set_cptable (cptable );
184
189
```
185
190
186
191
** NodeJS**
@@ -211,7 +216,7 @@ import * as cpexcel from 'xlsx/dist/cpexcel.full.mjs';
211
216
XLSX .set_cptable (cpexcel);
212
217
```
213
218
214
- ** PhotoShop and InDesign**
219
+ ** Photoshop and InDesign**
215
220
216
221
` dist/xlsx.extendscript.js ` is an ExtendScript build for Photoshop and InDesign
217
222
that is included in the ` npm ` package. It can be directly referenced with a
@@ -538,9 +543,11 @@ The [`demos` directory](demos/) includes sample projects for:
538
543
- [ ` webpack 2.x ` ] ( demos/webpack/ )
539
544
540
545
** Platforms and Integrations**
546
+ - [ ` deno ` ] ( demos/deno/ )
541
547
- [ ` electron application ` ] ( demos/electron/ )
542
548
- [ ` nw.js application ` ] ( demos/nwjs/ )
543
549
- [ ` Chrome / Chromium extensions ` ] ( demos/chrome/ )
550
+ - [ ` Download a Google Sheet locally ` ] ( demos/google-sheet/ )
544
551
- [ ` Adobe ExtendScript ` ] ( demos/extendscript/ )
545
552
- [ ` Headless Browsers ` ] ( demos/headless/ )
546
553
- [ ` canvas-datagrid ` ] ( demos/datagrid/ )
@@ -609,6 +616,23 @@ const workbook = read(buf);
609
616
610
617
</details >
611
618
619
+ <details >
620
+ <summary ><b >Local file in a Deno application</b > (click to show)</summary >
621
+
622
+ ` readFile ` uses ` Deno.readFileSync ` under the hood:
623
+
624
+ ``` js
625
+ // @deno-types="https://deno.land/x/sheetjs/types/index.d.ts"
626
+ import * as XLSX from ' https://deno.land/x/sheetjs/xlsx.mjs'
627
+
628
+ const workbook = XLSX .readFile (" test.xlsx" );
629
+ ```
630
+
631
+ Applications reading files must be invoked with the ` --allow-read ` flag. The
632
+ [ ` deno ` demo] ( demos/deno/ ) has more examples
633
+
634
+ </details >
635
+
612
636
<details >
613
637
<summary ><b >User-submitted file in a web page ("Drag-and-Drop")</b > (click to show)</summary >
614
638
@@ -1467,6 +1491,23 @@ const workbook = writeFileSync("out.xlsb", buf);
1467
1491
1468
1492
</details >
1469
1493
1494
+ <details >
1495
+ <summary ><b >Local file in a Deno application</b > (click to show)</summary >
1496
+
1497
+ ` writeFile ` uses ` Deno.writeFileSync ` under the hood:
1498
+
1499
+ ``` js
1500
+ // @deno-types="https://deno.land/x/sheetjs/types/index.d.ts"
1501
+ import * as XLSX from ' https://deno.land/x/sheetjs/xlsx.mjs'
1502
+
1503
+ XLSX .writeFile (workbook, " test.xlsx" );
1504
+ ```
1505
+
1506
+ Applications writing files must be invoked with the ` --allow-write ` flag. The
1507
+ [ ` deno ` demo] ( demos/deno/ ) has more examples
1508
+
1509
+ </details >
1510
+
1470
1511
<details >
1471
1512
<summary ><b >Local file in a PhotoShop or InDesign plugin</b > (click to show)</summary >
1472
1513
0 commit comments