@@ -118,6 +118,8 @@ port calculations to web apps; automate common spreadsheet tasks, and much more!
118
118
119
119
### Installation
120
120
121
+ ** Standalone Browser Scripts**
122
+
121
123
The complete browser standalone build is saved to ` dist/xlsx.full.min.js ` and
122
124
can be directly added to a page with a ` script ` tag:
123
125
@@ -167,18 +169,50 @@ be configured to remove support with `resolve.alias`:
167
169
</details >
168
170
169
171
172
+ With [ bower] ( https://bower.io/search/?q=js-xlsx ) :
173
+
174
+ ``` bash
175
+ $ bower install js-xlsx
176
+ ```
177
+
178
+ ** Deno**
179
+
180
+ The [ ` sheetjs ` ] ( https://deno.land/x/sheetjs ) package is available on deno:
181
+
182
+ ``` ts
183
+ import * as XLSX from ' https://deno.land/x/sheetjs/xlsx.mjs'
184
+ ```
185
+
186
+ ** NodeJS**
187
+
170
188
With [ npm] ( https://www.npmjs.org/package/xlsx ) :
171
189
172
190
``` bash
173
191
$ npm install xlsx
174
192
```
175
193
176
- With [ bower ] ( https://bower.io/search/?q=js-xlsx ) :
194
+ By default, the module supports ` require ` :
177
195
178
- ``` bash
179
- $ bower install js-xlsx
196
+ ``` js
197
+ var XLSX = require (" xlsx" );
198
+ ```
199
+
200
+ The module also ships with ` xlsx.mjs ` for use with ` import ` :
201
+
202
+ ``` js
203
+ import * as XLSX from ' xlsx/xlsx.mjs' ;
204
+
205
+ /* load 'fs' for readFile and writeFile support */
206
+ import * as fs from ' fs' ;
207
+ XLSX .set_fs (fs);
208
+
209
+ /* load the codepage support library for extended support with older formats */
210
+ import * as cpexcel from ' xlsx/dist/cpexcel.full.mjs' ;
211
+ XLSX .set_cptable (cpexcel);
180
212
```
181
213
214
+ ** PhotoShop and InDesign**
215
+
182
216
` dist/xlsx.extendscript.js ` is an ExtendScript build for Photoshop and InDesign
183
217
that is included in the ` npm ` package. It can be directly referenced with a
184
218
` #include ` directive:
@@ -1650,7 +1684,9 @@ data grid for previewing and modifying structured data in the web browser. The
1650
1684
[ ` react-data-grid ` ] ( https://npm.im/react-data-grid ) is a data grid tailored for
1651
1685
react. It expects two properties: ` rows ` of data objects and ` columns ` which
1652
1686
describe the columns. For the purposes of massaging the data to fit the react
1653
- data grid API it is easiest to start from an array of arrays:
1687
+ data grid API it is easiest to start from an array of arrays.
1688
+
1689
+ This demo starts by fetching a remote file and using ` XLSX.read ` to extract:
1654
1690
1655
1691
``` js
1656
1692
import { useEffect , useState } from " react" ;
0 commit comments