extendscript
This commit is contained in:
parent
35a04a6dcf
commit
e07e52ca55
@ -8,7 +8,7 @@ sidebar_position: 5
|
||||
|
||||
`XLSX.version` is the version of the library (added by the build script).
|
||||
|
||||
`XLSX.SSF` is an embedded version of the [format library](https://github.com/SheetJS/ssf).
|
||||
`XLSX.SSF` is an embedded version of the [format library](https://github.com/SheetJS/sheetjs/tree/master/packages/ssf).
|
||||
|
||||
## Parsing functions
|
||||
|
||||
|
@ -140,19 +140,6 @@ XLSX.writeFile(workbook, "out.xlsb");
|
||||
`XLSX.writeFile` techniques work for most modern browsers as well as older IE.
|
||||
For much older browsers, there are workarounds implemented by wrapper libraries.
|
||||
|
||||
[`FileSaver.js`](https://github.com/eligrey/FileSaver.js/) implements `saveAs`.
|
||||
Note: `XLSX.writeFile` will automatically call `saveAs` if available.
|
||||
|
||||
```js
|
||||
/* bookType can be any supported output type */
|
||||
var wopts = { bookType:"xlsx", bookSST:false, type:"array" };
|
||||
|
||||
var wbout = XLSX.write(workbook,wopts);
|
||||
|
||||
/* the saveAs call downloads a file on the local machine */
|
||||
saveAs(new Blob([wbout],{type:"application/octet-stream"}), "test.xlsx");
|
||||
```
|
||||
|
||||
[`Downloadify`](https://github.com/dcneiner/downloadify) uses a Flash SWF button
|
||||
to generate local files, suitable for environments where ActiveX is unavailable:
|
||||
|
||||
|
@ -18,11 +18,6 @@ you want to test. Feature-specific tests are available with `make test_misc`
|
||||
```bash
|
||||
$ make test_misc # run core tests
|
||||
$ make test # run full tests
|
||||
$ make test_xls # only use the XLS test files
|
||||
$ make test_xlsx # only use the XLSX test files
|
||||
$ make test_xlsb # only use the XLSB test files
|
||||
$ make test_xml # only use the XML test files
|
||||
$ make test_ods # only use the ODS test files
|
||||
```
|
||||
|
||||
To enable all errors, set the environment variable `WTF=1`:
|
||||
@ -36,7 +31,6 @@ $ WTF=1 make test # enable all error messages
|
||||
|
||||
```bash
|
||||
$ make lint # eslint checks
|
||||
$ make flow # make lint + Flow checking
|
||||
$ make tslint # check TS definitions
|
||||
```
|
||||
|
||||
@ -50,23 +44,23 @@ Start a local server and navigate to that directory to run the tests.
|
||||
`make ctest` will generate the browser fixtures. To add more files, edit the
|
||||
`tests/fixtures.lst` file and add the paths.
|
||||
|
||||
To run the full in-browser tests, clone the repo for
|
||||
[`oss.sheetjs.com`](https://github.com/SheetJS/SheetJS.github.io) and replace
|
||||
the `xlsx.js` file (then open a browser window and go to `stress.html`):
|
||||
|
||||
```bash
|
||||
$ cp xlsx.js ../SheetJS.github.io
|
||||
$ cd ../SheetJS.github.io
|
||||
$ simplehttpserver # or "python -mSimpleHTTPServer" or "serve"
|
||||
$ open -a Chromium.app http://localhost:8000/stress.html
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="deno" label="Deno">
|
||||
|
||||
`make test-deno` will run the full Deno test suite and `make test-deno_misc`
|
||||
will run the smaller feature-specific tests.
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="extendscript" label="Extendscript">
|
||||
|
||||
`make dist` will build `xlsx.extendscript.js`.
|
||||
|
||||
The script `estk.jsx` at the root of the project is configured to run in
|
||||
ExtendScript Toolkit. It will read `sheetjs.xlsx` and attempt to write test
|
||||
files in a number of file formats.
|
||||
|
||||
ExtendScript Toolkit 3.5 is available as a standalone download for Windows.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
@ -31,7 +31,7 @@ Folders:
|
||||
|
||||
After cloning the repo, running `make help` will display a list of commands.
|
||||
|
||||
## Platform-Specific Setup
|
||||
## OS-Specific Setup
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
@ -75,12 +75,6 @@ chmod +x compile-git-with-openssl.sh
|
||||
./compile-git-with-openssl.sh
|
||||
```
|
||||
|
||||
4) (For deno testing) Install deno:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://deno.land/install.sh | sh
|
||||
```
|
||||
|
||||
(instructions continued in the OSX/Linux part)
|
||||
|
||||
</TabItem>
|
||||
@ -132,6 +126,12 @@ make test_misc
|
||||
# Full Build
|
||||
cd modules; make; cd ..
|
||||
make dist
|
||||
```
|
||||
|
||||
4) (For deno testing) Install deno:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://deno.land/install.sh | sh
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
|
Loading…
Reference in New Issue
Block a user