forked from sheetjs/docs.sheetjs.com
parse-comments
This commit is contained in:
parent
2462218120
commit
b96947e8f4
@ -19,12 +19,13 @@ Each standalone release script is available at <https://cdn.sheetjs.com/>.
|
||||
<script lang="javascript" src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js"></script>`}
|
||||
</code></pre>
|
||||
|
||||
The `latest` tag references the latest version and updates with each release:
|
||||
:::info
|
||||
|
||||
```html
|
||||
<!-- use the latest version -->
|
||||
<script lang="javascript" src="https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js"></script>
|
||||
```
|
||||
[Watch the repo](https://git.sheetjs.com/SheetJS/sheetjs) or subscribe to the
|
||||
[RSS feed](https://git.sheetjs.com/sheetjs/sheetjs/tags.rss) to be notified when
|
||||
new versions are released!
|
||||
|
||||
:::
|
||||
|
||||
:::warning
|
||||
|
||||
|
@ -44,6 +44,14 @@ import { read, writeFileXLSX } from "xlsx";
|
||||
The ["Bundlers" demo](/docs/demos/bundler) includes examples for specific
|
||||
bundler tools.
|
||||
|
||||
:::info
|
||||
|
||||
[Watch the repo](https://git.sheetjs.com/SheetJS/sheetjs) or subscribe to the
|
||||
[RSS feed](https://git.sheetjs.com/sheetjs/sheetjs/tags.rss) to be notified when
|
||||
new versions are released!
|
||||
|
||||
:::
|
||||
|
||||
:::warning
|
||||
|
||||
Older releases are technically available on the public npm registry as `xlsx`,
|
||||
|
@ -40,6 +40,14 @@ yarn add https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
:::info
|
||||
|
||||
[Watch the repo](https://git.sheetjs.com/SheetJS/sheetjs) or subscribe to the
|
||||
[RSS feed](https://git.sheetjs.com/sheetjs/sheetjs/tags.rss) to be notified when
|
||||
new versions are released!
|
||||
|
||||
:::
|
||||
|
||||
:::warning
|
||||
|
||||
Older releases are technically available on the public npm registry as `xlsx`,
|
||||
|
@ -25,6 +25,14 @@ script as `xlsx.full.min`.
|
||||
|
||||
:::
|
||||
|
||||
:::info
|
||||
|
||||
[Watch the repo](https://git.sheetjs.com/SheetJS/sheetjs) or subscribe to the
|
||||
[RSS feed](https://git.sheetjs.com/sheetjs/sheetjs/tags.rss) to be notified when
|
||||
new versions are released!
|
||||
|
||||
:::
|
||||
|
||||
## NetSuite
|
||||
|
||||
After downloading the script, it can be referenced directly in `define` calls
|
||||
|
@ -22,6 +22,14 @@ After downloading the script, it can be directly referenced with `#include`:
|
||||
#include "xlsx.extendscript.js"
|
||||
```
|
||||
|
||||
:::info
|
||||
|
||||
[Watch the repo](https://git.sheetjs.com/SheetJS/sheetjs) or subscribe to the
|
||||
[RSS feed](https://git.sheetjs.com/sheetjs/sheetjs/tags.rss) to be notified when
|
||||
new versions are released!
|
||||
|
||||
:::
|
||||
|
||||
For local deployments, the scripts can be placed in the `Scripts` folder. The
|
||||
path is application-specific.
|
||||
|
||||
|
@ -30,6 +30,14 @@ be reported to the Deno project for further diagnosis.
|
||||
|
||||
:::
|
||||
|
||||
:::info
|
||||
|
||||
[Watch the repo](https://git.sheetjs.com/SheetJS/sheetjs) or subscribe to the
|
||||
[RSS feed](https://git.sheetjs.com/sheetjs/sheetjs/tags.rss) to be notified when
|
||||
new versions are released!
|
||||
|
||||
:::
|
||||
|
||||
## Encoding support
|
||||
|
||||
If Encoding support is required, `cpexcel.full.mjs` must be manually imported:
|
||||
|
@ -29,6 +29,14 @@ be reported to the Bun project for further diagnosis.
|
||||
|
||||
:::
|
||||
|
||||
:::info
|
||||
|
||||
[Watch the repo](https://git.sheetjs.com/SheetJS/sheetjs) or subscribe to the
|
||||
[RSS feed](https://git.sheetjs.com/sheetjs/sheetjs/tags.rss) to be notified when
|
||||
new versions are released!
|
||||
|
||||
:::
|
||||
|
||||
## Encoding support
|
||||
|
||||
If Encoding support is required, `cpexcel.full.mjs` must be manually imported.
|
||||
|
@ -3,6 +3,10 @@ pagination_prev: getting-started/index
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Tutorial
|
||||
|
||||
SheetJS presents a simple JS interface that works with "Array of Arrays" and
|
||||
@ -254,9 +258,6 @@ function Presidents() { return ( <button onClick={async () => {
|
||||
|
||||
## Run the Demo Locally
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="browser" label="Web Browser">
|
||||
|
||||
@ -305,6 +306,7 @@ hosted (no `file:///` access).
|
||||
</script>
|
||||
<body>
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="nodejs" label="Command-Line (NodeJS)">
|
||||
|
||||
@ -364,9 +366,9 @@ like `axios` presents a similar API for fetching data:
|
||||
|
||||
Install the dependencies:
|
||||
|
||||
```bash
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz axios
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz axios`}
|
||||
</code></pre>
|
||||
|
||||
The differences in the script are highlighted below.
|
||||
|
||||
|
@ -28,3 +28,10 @@ read the installation instructions for your use case:
|
||||
});
|
||||
})}</ul>
|
||||
|
||||
:::info
|
||||
|
||||
[Watch the repo](https://git.sheetjs.com/SheetJS/sheetjs) or subscribe to the
|
||||
[RSS feed](https://git.sheetjs.com/sheetjs/sheetjs/tags.rss) to be notified when
|
||||
new versions are released!
|
||||
|
||||
:::
|
||||
|
@ -5,6 +5,8 @@ pagination_next: demos/grid/index
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
ReactJS is a JS library for building user interfaces.
|
||||
|
||||
This demo tries to cover common React data flow ideas and strategies. React
|
||||
@ -131,12 +133,12 @@ This demo was last run on 2023 February 28 using `create-react-app@5.0.1` and
|
||||
|
||||
2) Install the SheetJS dependency and start the dev server:
|
||||
|
||||
```bash
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
cd sheetjs-react
|
||||
npm install
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
npm start
|
||||
```
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz
|
||||
npm start`}
|
||||
</code></pre>
|
||||
|
||||
3) Open a web browser and access the displayed URL (`http://localhost:3000`)
|
||||
|
||||
@ -211,12 +213,12 @@ This demo was last run on 2023 February 28 using `create-react-app@5.0.1` and
|
||||
|
||||
2) Install the SheetJS dependency and start the dev server:
|
||||
|
||||
```bash
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
cd sheetjs-react
|
||||
npm install
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
npm start
|
||||
```
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz
|
||||
npm start`}
|
||||
</code></pre>
|
||||
|
||||
3) Open a web browser and access the displayed URL (`http://localhost:3000`)
|
||||
|
||||
|
@ -5,6 +5,8 @@ pagination_next: demos/grid/index
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
VueJS is a JS library for building user interfaces.
|
||||
|
||||
This demo covers common VueJS data flow ideas and strategies. Single-File
|
||||
@ -127,12 +129,12 @@ This demo was last run on 2023 April 06 using `vue@3.2.47`. When running
|
||||
|
||||
2) Install the SheetJS dependency and start the dev server:
|
||||
|
||||
```bash
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
cd sheetjs-vue
|
||||
npm install
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
npm run dev
|
||||
```
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz
|
||||
npm run dev`}
|
||||
</code></pre>
|
||||
|
||||
3) Open a web browser and access the displayed URL (`http://localhost:5173`)
|
||||
|
||||
@ -203,12 +205,12 @@ This demo was last run on 2023 April 06 using `vue@3.2.47`. When running
|
||||
|
||||
2) Install the SheetJS dependency and start the dev server:
|
||||
|
||||
```bash
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
cd sheetjs-vue
|
||||
npm install
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
npm run dev
|
||||
```
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz
|
||||
npm run dev`}
|
||||
</code></pre>
|
||||
|
||||
3) Open a web browser and access the displayed URL (`http://localhost:5173`)
|
||||
|
||||
|
@ -5,6 +5,7 @@ pagination_next: demos/grid/index
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
@ -162,13 +163,13 @@ This demo was last run on 2023 February 21 using Angular CLI `15.1.6`
|
||||
|
||||
2) Install the SheetJS dependency and start the dev server:
|
||||
|
||||
```bash
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
cd sheetjs-angular
|
||||
npm install
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz
|
||||
npx @angular/cli analytics disable
|
||||
npm start
|
||||
```
|
||||
npm start`}
|
||||
</code></pre>
|
||||
|
||||
3) Open a web browser and access the displayed URL (`http://localhost:4200`)
|
||||
|
||||
@ -250,13 +251,13 @@ This demo was last run on 2023 February 21 using Angular CLI `15.1.6`
|
||||
|
||||
2) Install the SheetJS dependency and start the dev server:
|
||||
|
||||
```bash
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
cd sheetjs-angular
|
||||
npm install
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz
|
||||
npx @angular/cli analytics disable
|
||||
npm start
|
||||
```
|
||||
npm start`}
|
||||
</code></pre>
|
||||
|
||||
3) Open a web browser and access the displayed URL (`http://localhost:4200`)
|
||||
|
||||
@ -590,10 +591,10 @@ curl -o tsconfig.app.json -L https://docs.sheetjs.com/angular/versions/tsconfig.
|
||||
|
||||
2) install project and dependencies:
|
||||
|
||||
```bash
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
npm i
|
||||
npm i -S https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
```
|
||||
npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}
|
||||
</code></pre>
|
||||
|
||||
3) start a local server with
|
||||
|
||||
|
@ -5,6 +5,8 @@ pagination_next: demos/grid/index
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
Svelte is a JS library for building user interfaces.
|
||||
|
||||
This demo tries to cover common Svelte data flow ideas and strategies. Svelte
|
||||
@ -127,12 +129,12 @@ This demo was last run on 2023 March 08 using `svelte@3.55.1`. When running
|
||||
|
||||
2) Install the SheetJS dependency and start the dev server:
|
||||
|
||||
```bash
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
cd sheetjs-svelte
|
||||
npm install
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
npm run dev
|
||||
```
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz
|
||||
npm run dev`}
|
||||
</code></pre>
|
||||
|
||||
3) Open a web browser and access the displayed URL (`http://localhost:5173`)
|
||||
|
||||
@ -205,12 +207,12 @@ This demo was last run on 2023 March 08 using `svelte@3.55.1`. When running
|
||||
|
||||
2) Install the SheetJS dependency and start the dev server:
|
||||
|
||||
```bash
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
cd sheetjs-svelte
|
||||
npm install
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
npm run dev
|
||||
```
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz
|
||||
npm run dev`}
|
||||
</code></pre>
|
||||
|
||||
3) Open a web browser and access the displayed URL (`http://localhost:5173`)
|
||||
|
||||
|
@ -41,8 +41,8 @@ This demo includes all of the support files for the Flash and ActiveX methods.
|
||||
1) Download the standalone script and shim to a server that will host the demo:
|
||||
|
||||
<ul>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js`}>shim.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
</ul>
|
||||
|
||||
2) [Download the demo ZIP](pathname:///ie/SheetJSIESupport.zip) to the server.
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/frontend/index
|
||||
pagination_next: demos/net/index
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
:::note
|
||||
|
||||
This demo was last tested on 2023 April 18 with `react-data-grid 7.0.0-beta.28`,
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/frontend/index
|
||||
pagination_next: demos/net/index
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
:::note
|
||||
|
||||
This demo was tested against `vue3-table-lite 1.2.4`, VueJS `3.2.47`, ViteJS
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/frontend/index
|
||||
pagination_next: demos/net/index
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
:::note
|
||||
|
||||
This demo was last tested on 2023 February 07 with the ViteJS+React+TypeScript
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/frontend/index
|
||||
pagination_next: demos/net/index
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
Various JavaScript UI components provide a more interactive editing experience.
|
||||
Most are able to interchange with arrays of arrays or arrays of data objects.
|
||||
This demo focuses on a few open source data grids.
|
||||
|
@ -2,6 +2,8 @@
|
||||
title: HTTP Server Processing
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
Server-Side JS platforms like NodeJS and Deno have built-in APIs for listening
|
||||
on network interfaces. They provide wrappers for requests and responses.
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
title: Browser Automation
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
|
@ -6,6 +6,8 @@ sidebar_custom_props:
|
||||
type: bundler
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
:::note
|
||||
|
||||
This demo covers static asset imports. For processing files in the browser, the
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/net/index
|
||||
pagination_next: demos/mobile/index
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
:::note
|
||||
|
||||
This was tested against `next v13.1.1` on 2023 January 14.
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/net/index
|
||||
pagination_next: demos/mobile/index
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
`@nuxt/content` is a file-based CMS for Nuxt, enabling static-site generation
|
||||
and on-demand server rendering powered by spreadsheets.
|
||||
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/net/index
|
||||
pagination_next: demos/mobile/index
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
:::note
|
||||
|
||||
This demo uses ["Base64 Loader"](/docs/demos/static/vitejs#base64-loader)
|
||||
@ -149,9 +151,9 @@ curl -Lo src/data/pres.numbers https://sheetjs.com/pres.numbers
|
||||
|
||||
3) Install the SheetJS library:
|
||||
|
||||
```bash
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}
|
||||
</code></pre>
|
||||
|
||||
4) Replace `src/pages/index.astro` with the following:
|
||||
|
||||
|
@ -7,6 +7,7 @@ sidebar_custom_props:
|
||||
summary: React + Native Rendering
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
|
@ -7,6 +7,8 @@ sidebar_custom_props:
|
||||
summary: JS + Native Elements
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
The [NodeJS Module](/docs/getting-started/installation/nodejs) can be imported
|
||||
from the main entrypoint or any script in the project.
|
||||
|
||||
@ -108,9 +110,9 @@ selecting the terminal and entering the key sequence `CTRL + C`
|
||||
|
||||
3) From the project folder, install the library:
|
||||
|
||||
```bash
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}
|
||||
</code></pre>
|
||||
|
||||
4) To confirm the library was loaded, change the title to show the version. The
|
||||
differences are highlighted.
|
||||
|
@ -7,6 +7,8 @@ sidebar_custom_props:
|
||||
summary: VueJS + Web View
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
The [NodeJS Module](/docs/getting-started/installation/nodejs) can be imported
|
||||
from the main entrypoint or any script in the project.
|
||||
|
||||
@ -152,11 +154,11 @@ When prompted:
|
||||
|
||||
<!-- spellchecker-enable -->
|
||||
|
||||
```bash
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
cd SheetJSQuasar
|
||||
npm i
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
```
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}
|
||||
</code></pre>
|
||||
|
||||
3) Set up Cordova:
|
||||
|
||||
|
@ -7,6 +7,8 @@ sidebar_custom_props:
|
||||
summary: Native Components + Web View
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
The [NodeJS Module](/docs/getting-started/installation/nodejs) can be imported
|
||||
from the main entrypoint or any script in the project.
|
||||
|
||||
|
@ -7,6 +7,8 @@ sidebar_custom_props:
|
||||
summary: JS + Web View
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
The [NodeJS Module](/docs/getting-started/installation/nodejs) can be imported
|
||||
from the main entrypoint or any script in the project.
|
||||
|
||||
@ -146,10 +148,10 @@ cd sheetjs-cap
|
||||
|
||||
3) Install dependencies:
|
||||
|
||||
```bash
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
npm i --save @capacitor/core @capacitor/cli @capacitor/filesystem
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz
|
||||
npm i --save @capacitor/core @capacitor/cli @capacitor/filesystem`}
|
||||
</code></pre>
|
||||
|
||||
4) Create CapacitorJS structure:
|
||||
|
||||
|
@ -7,6 +7,7 @@ sidebar_custom_props:
|
||||
summary: Embedded Chromium + NodeJS
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
|
@ -7,6 +7,7 @@ sidebar_custom_props:
|
||||
summary: Webview + Go Backend
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
|
@ -7,8 +7,10 @@ sidebar_custom_props:
|
||||
summary: Webview + Rust Backend
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
|
||||
The [NodeJS Module](/docs/getting-started/installation/nodejs) can be imported
|
||||
from JavaScript code.
|
||||
@ -152,12 +154,12 @@ When prompted:
|
||||
|
||||
2) Enter the directory and install dependencies:
|
||||
|
||||
```bash
|
||||
<CodeBlock language="bash">{`\
|
||||
cd SheetJSTauri
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz
|
||||
npm i --save @tauri-apps/api
|
||||
npm i --save-dev @tauri-apps/cli
|
||||
```
|
||||
npm i --save-dev @tauri-apps/cli`}
|
||||
</CodeBlock>
|
||||
|
||||
3) Enable operations by adding the highlighted lines to `tauri.conf.json` in
|
||||
the `tauri.allowlist` section:
|
||||
|
@ -7,6 +7,7 @@ sidebar_custom_props:
|
||||
summary: Native Components with React
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
@ -246,11 +247,11 @@ npx react-native-windows-init --no-telemetry --overwrite
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
Install library:
|
||||
Install the SheetJS library:
|
||||
|
||||
```powershell
|
||||
npm install --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}
|
||||
</code></pre>
|
||||
|
||||
To ensure that the app works, launch the app:
|
||||
|
||||
@ -453,11 +454,11 @@ Create the MacOS part of the application:
|
||||
npx react-native-macos-init --no-telemetry
|
||||
```
|
||||
|
||||
Install Library:
|
||||
Install the SheetJS library:
|
||||
|
||||
```
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}
|
||||
</code></pre>
|
||||
|
||||
To ensure that the app works, launch the app:
|
||||
|
||||
|
@ -7,6 +7,8 @@ sidebar_custom_props:
|
||||
sql: true
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
WebSQL is a popular SQL-based in-browser database available on Chrome. In
|
||||
practice, it is powered by SQLite, and most simple SQLite-compatible queries
|
||||
work as-is in WebSQL.
|
||||
|
@ -98,11 +98,11 @@ function SheetJSAlaSQL() {
|
||||
The [Standalone scripts](/docs/getting-started/installation/standalone) should
|
||||
be loaded before the `alasql` script:
|
||||
|
||||
```html
|
||||
<script src="https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js"></script>
|
||||
<script src="https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/alasql"></script>
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-html"}}>{`\
|
||||
<script src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js"></script>
|
||||
<script src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/alasql"></script>`}
|
||||
</code></pre>
|
||||
|
||||
#### Frameworks and Bundlers
|
||||
|
||||
|
@ -6,6 +6,8 @@ sidebar_custom_props:
|
||||
sql: true
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
:::note
|
||||
|
||||
This demo was last tested on 2023 April 19 with Knex 2.4.2 and `better-sqlite`.
|
||||
@ -37,9 +39,9 @@ const worksheet = XLSX.utils.json_to_sheet(aoo);
|
||||
|
||||
1) Install dependencies:
|
||||
|
||||
```bash
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz knex better-sqlite3
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz knex better-sqlite3`}
|
||||
</code></pre>
|
||||
|
||||
2) Download the [test file](https://sheetjs.com/pres.numbers)
|
||||
|
||||
|
@ -6,6 +6,8 @@ sidebar_custom_props:
|
||||
type: document
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
MongoDB is a popular document-oriented database engine.
|
||||
|
||||
It is straightforward to treat collections as worksheets. Each object maps to
|
||||
|
@ -6,6 +6,8 @@ sidebar_custom_props:
|
||||
type: nosql
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
Redis has 5 core data types: "String", List", "Set", "Sorted Set", and "Hash".
|
||||
Since the keys and values are limited to simple strings (and numbers), it is
|
||||
possible to store complete databases in a single worksheet.
|
||||
@ -201,10 +203,10 @@ curl -LO https://docs.sheetjs.com/nosql/SheetJSRedisTest.mjs
|
||||
|
||||
2) Install dependencies and run:
|
||||
|
||||
```bash
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz redis@4.6.4
|
||||
node SheetJSRedisTest.mjs
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz redis@4.6.4
|
||||
node SheetJSRedisTest.mjs`}
|
||||
</code></pre>
|
||||
|
||||
Inspect the output and compare with the data in `SheetJSRedisTest.mjs`.
|
||||
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/local/index
|
||||
pagination_next: demos/extensions/index
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
AWS is a Cloud Services platform which includes traditional virtual machine
|
||||
support, "Serverless Functions", cloud storage and much more.
|
||||
|
||||
|
@ -4,8 +4,10 @@ pagination_prev: demos/local/index
|
||||
pagination_next: demos/extensions/index
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
|
||||
This demo uses `node-google-spreadsheet` to interact with Google Sheets v4 API.
|
||||
|
||||
@ -28,9 +30,9 @@ covers Apps Script integration.
|
||||
|
||||
Install the dependencies:
|
||||
|
||||
```bash
|
||||
npm i https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz google-spreadsheet@3.3.0
|
||||
```
|
||||
<CodeBlock language="bash">{`\
|
||||
npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz google-spreadsheet@3.3.0`}
|
||||
</CodeBlock>
|
||||
|
||||
The library README has a [guide](https://theoephraim.github.io/node-google-spreadsheet/#/getting-started/authentication)
|
||||
for configuring a service worker with write access to the document. Following
|
||||
@ -73,9 +75,9 @@ should be granted the "Editor" role
|
||||
|
||||
2) Install the dependencies:
|
||||
|
||||
```
|
||||
npm i https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz google-spreadsheet@3.3.0
|
||||
```
|
||||
<CodeBlock language="bash">{`\
|
||||
npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz google-spreadsheet@3.3.0`}
|
||||
</CodeBlock>
|
||||
|
||||
2) Save the following snippet to `common.js`:
|
||||
|
||||
@ -205,9 +207,9 @@ should be granted the "Editor" role
|
||||
|
||||
2) Install the dependencies:
|
||||
|
||||
```
|
||||
npm i https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz google-spreadsheet@3.3.0
|
||||
```
|
||||
<CodeBlock language="bash">{`\
|
||||
npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz google-spreadsheet@3.3.0`}
|
||||
</CodeBlock>
|
||||
|
||||
2) Save the following snippet to `common.js`:
|
||||
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/local/index
|
||||
pagination_next: demos/extensions/index
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
Airtable recommends Personal Access Tokens for interacting with their API. When
|
||||
fetching data from the API, the result will include an array of row objects that
|
||||
can be converted to a worksheet with `XLSX.utils.json_to_sheet`. The API methods
|
||||
@ -13,9 +15,9 @@ to write data will accept row objects generated by `XLSX.utils.sheet_to_json`.
|
||||
|
||||
The main module is `airtable` and can be installed with `npm`:
|
||||
|
||||
```bash
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz airtable
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz airtable`}
|
||||
</code></pre>
|
||||
|
||||
To obtain a reference to a table, code needs a [PAT](#personal-access-token),
|
||||
the name of the workspace (typically starting with `app`), and the name of the
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/local/index
|
||||
pagination_next: demos/extensions/index
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
Azure is a Cloud Services platform which includes traditional virtual machine
|
||||
support, "Serverless Functions", cloud storage and much more.
|
||||
|
||||
|
@ -4,6 +4,9 @@ pagination_prev: demos/local/index
|
||||
pagination_next: demos/extensions/index
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
|
||||
Many official data releases by governments and organizations include XLSX or
|
||||
XLS files. Unfortunately some data sources do not retain older versions.
|
||||
|
||||
@ -109,10 +112,11 @@ data formats. The `readXLSX` helper uses SheetJS under the hood.
|
||||
The library uses an older version of the SheetJS library. To use the latest
|
||||
releases, the examples import from the SheetJS CDN:
|
||||
|
||||
```ts
|
||||
// @deno-types="https://cdn.sheetjs.com/xlsx-latest/package/types/index.d.ts"
|
||||
import * as XLSX from 'https://cdn.sheetjs.com/xlsx-latest/package/xlsx.mjs';
|
||||
```
|
||||
<CodeBlock language="ts">{`\
|
||||
// @deno-types="https://cdn.sheetjs.com/xlsx-${current}/package/types/index.d.ts"
|
||||
import * as XLSX from 'https://cdn.sheetjs.com/xlsx-${current}/package/xlsx.mjs';`}
|
||||
</CodeBlock>
|
||||
|
||||
|
||||
The official Deno registry is out of date. This is a known registry bug.
|
||||
|
||||
@ -123,30 +127,30 @@ The official Deno registry is out of date. This is a known registry bug.
|
||||
The first argument to the post-processing script is the filename. The file can
|
||||
be read with `XLSX.readFile` directly. `XLSX.utils.sheet_to_csv` generates CSV:
|
||||
|
||||
```ts title="postprocess.ts"
|
||||
// @deno-types="https://cdn.sheetjs.com/xlsx-latest/package/types/index.d.ts"
|
||||
import * as XLSX from 'https://cdn.sheetjs.com/xlsx-latest/package/xlsx.mjs';
|
||||
<CodeBlock title="postprocess.ts" language="ts">{`\
|
||||
// @deno-types="https://cdn.sheetjs.com/xlsx-${current}/package/types/index.d.ts"
|
||||
import * as XLSX from 'https://cdn.sheetjs.com/xlsx-${current}/package/xlsx.mjs';
|
||||
/* load the codepage support library for extended support with older formats */
|
||||
import * as cptable from 'https://cdn.sheetjs.com/xlsx-latest/package/dist/cpexcel.full.mjs';
|
||||
import * as cptable from 'https://cdn.sheetjs.com/xlsx-${current}/package/dist/cpexcel.full.mjs';
|
||||
XLSX.set_cptable(cptable);
|
||||
|
||||
\n\
|
||||
/* get the file path for the downloaded file and generate the CSV path */
|
||||
const in_file = Deno.args[0];
|
||||
const out_file = in_file.replace(/.xlsx$/, ".csv");
|
||||
|
||||
\n\
|
||||
/* read file */
|
||||
// highlight-next-line
|
||||
const workbook = XLSX.readFile(in_file);
|
||||
|
||||
\n\
|
||||
/* generate CSV from first worksheet */
|
||||
const first_sheet = workbook.Sheets[workbook.SheetNames[0]];
|
||||
// highlight-next-line
|
||||
const csv = XLSX.utils.sheet_to_csv(first_sheet);
|
||||
|
||||
\n\
|
||||
/* write CSV */
|
||||
// highlight-next-line
|
||||
Deno.writeFileSync(out_file, new TextEncoder().encode(csv));
|
||||
```
|
||||
Deno.writeFileSync(out_file, new TextEncoder().encode(csv));`}
|
||||
</CodeBlock>
|
||||
|
||||
|
||||
## Complete Example
|
||||
@ -178,28 +182,28 @@ You will be redirected to the new project.
|
||||
The main panel will show a `postprocess.ts` tab. Copy the following code to
|
||||
the main editor window:
|
||||
|
||||
```ts title="postprocess.ts"
|
||||
// @deno-types="https://cdn.sheetjs.com/xlsx-latest/package/types/index.d.ts"
|
||||
import * as XLSX from 'https://cdn.sheetjs.com/xlsx-latest/package/xlsx.mjs';
|
||||
<CodeBlock title="postprocess.ts" language="ts">{`\
|
||||
// @deno-types="https://cdn.sheetjs.com/xlsx-${current}/package/types/index.d.ts"
|
||||
import * as XLSX from 'https://cdn.sheetjs.com/xlsx-${current}/package/xlsx.mjs';
|
||||
/* load the codepage support library for extended support with older formats */
|
||||
import * as cptable from 'https://cdn.sheetjs.com/xlsx-latest/package/dist/cpexcel.full.mjs';
|
||||
import * as cptable from 'https://cdn.sheetjs.com/xlsx-${current}/package/dist/cpexcel.full.mjs';
|
||||
XLSX.set_cptable(cptable);
|
||||
|
||||
\n\
|
||||
/* get the file path for the downloaded file and generate the CSV path */
|
||||
const in_file = Deno.args[0];
|
||||
const out_file = in_file.replace(/.xlsx$/, ".csv");
|
||||
|
||||
\n\
|
||||
/* read file */
|
||||
const workbook = XLSX.readFile(in_file);
|
||||
|
||||
\n\
|
||||
/* generate CSV */
|
||||
const first_sheet = workbook.Sheets[workbook.SheetNames[0]];
|
||||
const csv = XLSX.utils.sheet_to_csv(first_sheet);
|
||||
|
||||
\n\
|
||||
/* write CSV */
|
||||
// highlight-next-line
|
||||
Deno.writeFileSync(out_file, new TextEncoder().encode(csv));
|
||||
```
|
||||
Deno.writeFileSync(out_file, new TextEncoder().encode(csv));`}
|
||||
</CodeBlock>
|
||||
|
||||
|
||||
4) In the left "EXPLORER" panel, double-click just below README.md. A text box
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/cloud/index
|
||||
pagination_next: demos/bigdata/index
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
:::info
|
||||
|
||||
This demo focuses on the JavaScript API included with Excel. For reading and
|
||||
@ -132,9 +134,9 @@ element with name `bt:String`. Change the `DefaultValue` attribute to `SHEETJS`:
|
||||
|
||||
7) Install the SheetJS library in the project
|
||||
|
||||
```bash
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}
|
||||
</code></pre>
|
||||
|
||||
8) Replace `src\functions\functions.js` with the following:
|
||||
|
||||
|
@ -4,6 +4,9 @@ pagination_prev: demos/cloud/index
|
||||
pagination_next: demos/bigdata/index
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
|
||||
:::note
|
||||
|
||||
This demo focuses on Google Apps Script custom functions. For external data
|
||||
@ -36,11 +39,11 @@ This demo was last tested on 2023 April 17.
|
||||
|
||||
The `clasp` command line tool can be used to upload the standalone script:
|
||||
|
||||
```bash
|
||||
<CodeBlock language="bash">{`\
|
||||
npx @google/clasp clone SCRIPT_ID
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js
|
||||
npx @google/clasp push
|
||||
```
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js
|
||||
npx @google/clasp push`}
|
||||
</CodeBlock>
|
||||
|
||||
Once uploaded, the script `xlsx.full.min.gs` will be added to the project.
|
||||
|
||||
@ -137,9 +140,9 @@ and paste in the terminal. Press Enter after pasting the ID.
|
||||
|
||||
7) Download the standalone build and move to the project directory:
|
||||
|
||||
```bash
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}
|
||||
</code></pre>
|
||||
|
||||
8) Push the project to Apps Script:
|
||||
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/cloud/index
|
||||
pagination_next: demos/bigdata/index
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
Open Scripting Architecture (OSA), a built-in feature in macOS introduced in
|
||||
1993, enables users to communicate with applications with a standardized
|
||||
language and grammar. macOS releases starting from Yosemite (OSX 10.10) include
|
||||
@ -144,10 +146,10 @@ data in CSV format.
|
||||
|
||||
0) Download the standalone script and test file:
|
||||
|
||||
```bash
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
curl -LO https://sheetjs.com/pres.numbers
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js
|
||||
```
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}
|
||||
</code></pre>
|
||||
|
||||
<Tabs groupId="osa">
|
||||
<TabItem value="js" label="JavaScript">
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/cloud/index
|
||||
pagination_next: demos/bigdata/index
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
:::note
|
||||
|
||||
This demo was last tested in 2023 April 22 in Mathematica 13.2.1
|
||||
@ -54,12 +56,12 @@ This demo was tested in macOS. The path names will differ in other platforms.
|
||||
|
||||
1) Create the standalone `xlsx-cli` binary:
|
||||
|
||||
```bash
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
cd /tmp
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz exit-on-epipe commander@2
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz exit-on-epipe commander@2
|
||||
curl -LO https://docs.sheetjs.com/cli/xlsx-cli.js
|
||||
npx nexe -t 14.15.3 xlsx-cli.js
|
||||
```
|
||||
npx nexe -t 14.15.3 xlsx-cli.js`}
|
||||
</code></pre>
|
||||
|
||||
This is discussed in ["Command-line Tools"](/docs/demos/desktop/cli)
|
||||
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/bigdata/index
|
||||
pagination_next: solutions/input
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
Duktape is an embeddable JS engine written in C. It has been ported to a number
|
||||
of exotic architectures and operating systems.
|
||||
|
||||
@ -132,16 +134,16 @@ mv duktape-2.7.0/src/*.{c,h} .
|
||||
1) Download the standalone script, shim and test file:
|
||||
|
||||
<ul>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js`}>shim.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li>
|
||||
</ul>
|
||||
|
||||
```bash
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js
|
||||
curl -LO https://sheetjs.com/pres.numbers
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js
|
||||
curl -LO https://sheetjs.com/pres.numbers`}
|
||||
</code></pre>
|
||||
|
||||
2) Download [`sheetjs.duk.c`](pathname:///duk/sheetjs.duk.c):
|
||||
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/bigdata/index
|
||||
pagination_next: solutions/input
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
iOS and MacOS ship with the JavaScriptCore framework for running JS code from
|
||||
Swift and Objective-C. Hybrid function invocation is tricky, but explicit data
|
||||
passing is straightforward. The demo shows a standalone Swift sample for MacOS.
|
||||
@ -127,14 +129,14 @@ cd sheetjswift
|
||||
1) Download the standalone script and the test file:
|
||||
|
||||
<ul>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li>
|
||||
</ul>
|
||||
|
||||
```bash
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js
|
||||
curl -LO https://sheetjs.com/pres.numbers
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js
|
||||
curl -LO https://sheetjs.com/pres.numbers`}
|
||||
</code></pre>
|
||||
|
||||
2) Download the Swift scripts for the demo
|
||||
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/bigdata/index
|
||||
pagination_next: solutions/input
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
Rhino is an ES3+ engine in Java.
|
||||
|
||||
The [Standalone scripts](/docs/getting-started/installation/standalone) can be
|
||||
@ -134,14 +136,14 @@ curl -L -o rhino.jar https://github.com/mozilla/rhino/releases/download/Rhino1_7
|
||||
1) Download the standalone script and the test file:
|
||||
|
||||
<ul>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href="https://sheetjs.com/pres.xlsx">pres.xlsx</a></li>
|
||||
</ul>
|
||||
|
||||
```bash
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js
|
||||
curl -LO https://sheetjs.com/pres.xlsx
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js
|
||||
curl -LO https://sheetjs.com/pres.xlsx`}
|
||||
</code></pre>
|
||||
|
||||
2) Download [`SheetJSRhino.zip`](pathname:///rhino/SheetJSRhino.zip) and unzip
|
||||
|
||||
|
@ -4,6 +4,7 @@ pagination_prev: demos/bigdata/index
|
||||
pagination_next: solutions/input
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
@ -122,16 +123,16 @@ curl -LO "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-util/9
|
||||
1) Download the standalone script, shim script, and the test file:
|
||||
|
||||
<ul>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js`}>shim.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li>
|
||||
<li><a href="https://sheetjs.com/pres.xlsx">pres.xlsx</a></li>
|
||||
</ul>
|
||||
|
||||
```bash
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js
|
||||
curl -LO https://sheetjs.com/pres.xlsx
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js
|
||||
curl -LO https://sheetjs.com/pres.xlsx`}
|
||||
</code></pre>
|
||||
|
||||
2) Download [`SheetJSNashorn.java`](pathname:///nashorn/SheetJSNashorn.java):
|
||||
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/bigdata/index
|
||||
pagination_next: solutions/input
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
Goja is a pure Go implementation of ECMAScript 5.
|
||||
|
||||
The [Standalone scripts](/docs/getting-started/installation/standalone) can be
|
||||
@ -103,16 +105,16 @@ go get github.com/dop251/goja
|
||||
1) Download the standalone script, shim and test file:
|
||||
|
||||
<ul>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js`}>shim.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li>
|
||||
<li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li>
|
||||
</ul>
|
||||
|
||||
```bash
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js
|
||||
curl -LO https://sheetjs.com/pres.numbers
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js
|
||||
curl -LO https://sheetjs.com/pres.numbers`}
|
||||
</code></pre>
|
||||
|
||||
2) Download [`SheetGoja.go`](pathname:///goja/SheetGoja.go):
|
||||
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/bigdata/index
|
||||
pagination_next: solutions/input
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
ChakraCore is an embeddable JS engine written in C++.
|
||||
|
||||
The [Standalone scripts](/docs/getting-started/installation/standalone) can be
|
||||
@ -152,16 +154,16 @@ This program tries to parse the file specified by the first argument
|
||||
4) Download the standalone script, shim script, and test file:
|
||||
|
||||
<ul>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js`}>shim.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li>
|
||||
<li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li>
|
||||
</ul>
|
||||
|
||||
```bash
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js
|
||||
curl -LO https://sheetjs.com/pres.numbers
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js
|
||||
curl -LO https://sheetjs.com/pres.numbers`}
|
||||
</code></pre>
|
||||
|
||||
5) Run the test program:
|
||||
|
||||
@ -190,8 +192,8 @@ to your project folder.
|
||||
1) Download the standalone script, shim, and test file:
|
||||
|
||||
<ul>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js`}>shim.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li>
|
||||
<li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li>
|
||||
</ul>
|
||||
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/bigdata/index
|
||||
pagination_next: solutions/input
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
QuickJS is an embeddable JS engine written in C. It provides a separate set of
|
||||
functions for interacting with the filesystem and the global object. It can run
|
||||
the standalone browser scripts.
|
||||
@ -157,14 +159,14 @@ This program tries to parse the file specified by the first argument
|
||||
4) Download the standalone script and test file:
|
||||
|
||||
<ul>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li>
|
||||
</ul>
|
||||
|
||||
```bash
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js
|
||||
curl -LO https://sheetjs.com/pres.numbers
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js
|
||||
curl -LO https://sheetjs.com/pres.numbers`}
|
||||
</code></pre>
|
||||
|
||||
5) Run the test program:
|
||||
|
||||
@ -189,14 +191,14 @@ This demo was last tested on 2023 March 11 against QuickJS `2021-03-27`.
|
||||
1) Download the standalone script and the test file:
|
||||
|
||||
<ul>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li>
|
||||
</ul>
|
||||
|
||||
```bash
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js
|
||||
curl -LO https://sheetjs.com/pres.numbers
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js
|
||||
curl -LO https://sheetjs.com/pres.numbers`}
|
||||
</code></pre>
|
||||
|
||||
2) Download [`SheetJSQuick.js`](pathname:///quickjs/SheetJSQuick.js)
|
||||
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/bigdata/index
|
||||
pagination_next: solutions/input
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
ExecJS is a Ruby abstraction over a number of JS runtimes including V8.
|
||||
|
||||
The [Standalone scripts](/docs/getting-started/installation/standalone) can be
|
||||
@ -75,14 +77,14 @@ gem install execjs
|
||||
1) Download the standalone script and test file:
|
||||
|
||||
<ul>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li>
|
||||
</ul>
|
||||
|
||||
```bash
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js
|
||||
curl -LO https://sheetjs.com/pres.numbers
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js
|
||||
curl -LO https://sheetjs.com/pres.numbers`}
|
||||
</code></pre>
|
||||
|
||||
2) Download [`ExecSheetJS.rb`](pathname:///execjs/ExecSheetJS.rb):
|
||||
|
||||
|
@ -4,6 +4,8 @@ pagination_prev: demos/bigdata/index
|
||||
pagination_next: solutions/input
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
:::warning
|
||||
|
||||
In a production application, it is strongly recommended to use a binding for a
|
||||
@ -111,9 +113,9 @@ cpan install JE
|
||||
|
||||
2) Download the [ExtendScript build](/docs/getting-started/installation/extendscript):
|
||||
|
||||
```bash
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.extendscript.js
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.extendscript.js`}
|
||||
</code></pre>
|
||||
|
||||
3) Download the demo [`SheetJE.pl`](pathname:///perl/SheetJE.pl):
|
||||
|
||||
|
@ -103,8 +103,8 @@ as a Base64 string and directly add it to an amalgamated script.
|
||||
1) Download the standalone script, shim, and test file:
|
||||
|
||||
<ul>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js`}>shim.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li>
|
||||
<li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li>
|
||||
</ul>
|
||||
|
||||
@ -200,8 +200,8 @@ python tools/build.py --error-messages=ON --logging=ON --mem-heap=8192 --cpointe
|
||||
1) Download the standalone script, shim, and test file:
|
||||
|
||||
<ul>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js`}>shim.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li>
|
||||
<li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li>
|
||||
<li><a href="https://sheetjs.com/pres.xlsx">pres.xlsx</a></li>
|
||||
</ul>
|
||||
|
||||
|
@ -8,6 +8,7 @@ pagination_prev: demos/index
|
||||
import current from '/version.js';
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
|
||||
## Parsing Workbooks
|
||||
|
||||
@ -780,24 +781,25 @@ Here are a few common scenarios (click on each subtitle to see the code):
|
||||
<details>
|
||||
<summary><b>HTML TABLE element in a webpage</b> (click to show)</summary>
|
||||
|
||||
```html
|
||||
<CodeBlock language="html">{`\
|
||||
<!-- include the standalone script and shim -->
|
||||
<script src="https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js"></script>
|
||||
<script src="https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js"></script>
|
||||
|
||||
<script src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js"></script>
|
||||
<script src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js"></script>
|
||||
\n\
|
||||
<!-- example table with id attribute -->
|
||||
<table id="tableau">
|
||||
<tr><td>Sheet</td><td>JS</td></tr>
|
||||
<tr><td>12345</td><td>67</td></tr>
|
||||
</table>
|
||||
|
||||
\n\
|
||||
<!-- this block should appear after the table HTML and the standalone script -->
|
||||
<script type="text/javascript">
|
||||
var workbook = XLSX.utils.table_to_book(document.getElementById("tableau"));
|
||||
|
||||
\n\
|
||||
/* DO SOMETHING WITH workbook HERE */
|
||||
</script>
|
||||
```
|
||||
XLSX.writeFile(workbook, "SheetJSHTMLExport.xlsx");
|
||||
</script>`}
|
||||
</CodeBlock>
|
||||
|
||||
Multiple tables on a web page can be converted to individual worksheets:
|
||||
|
||||
@ -828,8 +830,8 @@ var workbook = XLSX.read(htmlstr, {type:"string"});
|
||||
<details>
|
||||
<summary><b>Chrome/Chromium Extension</b> (click to show)</summary>
|
||||
|
||||
The [`chrome` demo](/docs/demos/chromium/) shows a complete example and details the required
|
||||
permissions and other settings.
|
||||
The [`chrome` demo](/docs/demos/chromium/) shows a complete example and details
|
||||
the required permissions and other settings.
|
||||
|
||||
In an extension, it is recommended to generate the workbook in a content script
|
||||
and pass the object back to the extension:
|
||||
|
@ -337,9 +337,9 @@ res.end(buf);
|
||||
|
||||
Install the library with
|
||||
|
||||
```bash
|
||||
npm i https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-bash"}}>{`\
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}
|
||||
</code></pre>
|
||||
|
||||
Save the following script to `node.js` and run with `node node.js`:
|
||||
|
||||
|
@ -47,7 +47,9 @@ characters may cause issues with other formats.
|
||||
|
||||
:::
|
||||
|
||||
<details open><summary><b>Live Example</b> (click to hide)</summary>
|
||||
<details open><summary><b>Live Export Example</b> (click to hide)</summary>
|
||||
|
||||
This example creates a small worksheet with a comment in cell A1:
|
||||
|
||||
```jsx live
|
||||
function SheetJSComments1() {
|
||||
@ -65,6 +67,45 @@ function SheetJSComments1() {
|
||||
|
||||
</details>
|
||||
|
||||
<details open><summary><b>Live Import Example</b> (click to hide)</summary>
|
||||
|
||||
This example displays every comment in the workbook:
|
||||
|
||||
```jsx live
|
||||
function SheetJSParseComments(props) {
|
||||
const [__html, setHTML] = React.useState("");
|
||||
|
||||
return ( <>
|
||||
<input type="file" onChange={async(e) => {
|
||||
/* parse workbook */
|
||||
const file = e.target.files[0];
|
||||
const data = await file.arrayBuffer();
|
||||
const wb = XLSX.read(data);
|
||||
|
||||
const html = [];
|
||||
wb.SheetNames.forEach(n => {
|
||||
var ws = wb.Sheets[n]; if(!ws) return;
|
||||
var ref = XLSX.utils.decode_range(ws["!ref"]);
|
||||
for(var R = 0; R <= ref.e.r; ++R) for(var C = 0; C <= ref.e.c; ++C) {
|
||||
var addr = XLSX.utils.encode_cell({r:R,c:C});
|
||||
if(!ws[addr] || !ws[addr].c) continue;
|
||||
var comments = ws[addr].c;
|
||||
if(!comments.length) continue;
|
||||
var threaded = !!comments[0].T;
|
||||
var msg = comments.map(c => c.t).join(threaded ? "\n" : "");
|
||||
console.log(comments);
|
||||
html.push(`${n}:${addr}:${+!!threaded}:${msg}`);
|
||||
}
|
||||
});
|
||||
setHTML(html.join("\n"));
|
||||
}}/>
|
||||
<pre dangerouslySetInnerHTML={{ __html }}/>
|
||||
</> );
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Visibility
|
||||
|
||||
To mark a comment as normally hidden, set the `hidden` property:
|
||||
|
@ -166,10 +166,10 @@ must be unique. After replacing the second `e` and `S` with `e_1` and `S_1`:
|
||||
|
||||
```js
|
||||
var ws = XLSX.utils.json_to_sheet([
|
||||
{ S:1, h:2, , , t:5, J:6, S_1:7 },
|
||||
{ S:2, h:3, , , t:6, J:7, S_1:8 }
|
||||
{ S:3, h:4, , , t:7, J:8, S_1:9 }
|
||||
{ S:4, h:5, e:6, e_1:7, t:8, J:9, S_1:0 }
|
||||
{ S:1, h:2, t:5, J:6, S_1:7 },
|
||||
{ S:2, h:3, t:6, J:7, S_1:8 },
|
||||
{ S:3, h:4, t:7, J:8, S_1:9 },
|
||||
{ S:4, h:5, e:6, e_1:7, t:8, J:9, S_1:0 },
|
||||
], {header:["S","h","e","e_1","t","J","S_1"]});
|
||||
```
|
||||
|
||||
@ -177,11 +177,11 @@ Alternatively, a different set of unique headers can be used with `skipHeader`:
|
||||
|
||||
```js
|
||||
var ws = XLSX.utils.json_to_sheet([
|
||||
{ A:"S", B:"h", C:"e", D:"e", E:"t", F:"J", G:"S" },
|
||||
{ A: 1, B: 2, , , E: 5, F: 6, G: 7 },
|
||||
{ A: 2, B: 3, , , E: 6, F: 7, G: 8 }
|
||||
{ A: 3, B: 4, , , E: 7, F: 8, G: 9 },
|
||||
{ A: 4, B: 5, C: 6, D: 7, E: 8, F: 9, G: 0 },
|
||||
{ A: "S", B: "h", C: "e", D: "e", E: "t", F: "J", G: "S" },
|
||||
{ A: 1, B: 2, E: 5, F: 6, G: 7 },
|
||||
{ A: 2, B: 3, E: 6, F: 7, G: 8 },
|
||||
{ A: 3, B: 4, E: 7, F: 8, G: 9 },
|
||||
{ A: 4, B: 5, C: 6, D: 7, E: 8, F: 9, G: 0 },
|
||||
], {header:["A","B","C","D","E","F","G"], skipHeader:true});
|
||||
```
|
||||
|
||||
|
@ -4,6 +4,8 @@ title: Troubleshooting
|
||||
hide_table_of_contents: true
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
Here are some common errors and their resolutions. This is not comprehensive.
|
||||
The [issue tracker](https://git.sheetjs.com/SheetJS/sheetjs/issues) has a
|
||||
wealth of information and user-contributed examples.
|
||||
@ -261,11 +263,11 @@ that include more browser-specific workarounds.
|
||||
|
||||
_Standalone Build_
|
||||
|
||||
```html
|
||||
<pre><code parentName="pre" {...{"className": "language-html"}}>{`\
|
||||
<script src="https://unpkg.com/file-saver@2.0.5/dist/FileSaver.js"></script>
|
||||
<script src="https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js"></script>
|
||||
<script src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js"></script>`}
|
||||
<!-- XLSX.writeFile will use the FileSaver `saveAs` implementation -->
|
||||
```
|
||||
</code></pre>
|
||||
|
||||
_Frameworks and Bundlers_
|
||||
|
||||
|
@ -4,6 +4,8 @@ hide_table_of_contents: true
|
||||
title: Overview
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
|
||||
# SheetJS CE
|
||||
|
||||
SheetJS Community Edition offers battle-tested open-source solutions for
|
||||
@ -30,11 +32,11 @@ run entirely in the web browser.
|
||||
<table id="TableToExport">
|
||||
```
|
||||
|
||||
2) Include a reference to the SheetJS Library in your page:
|
||||
2) Include a reference to the SheetJS library in your page:
|
||||
|
||||
```html
|
||||
<script src="https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js"></script>
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-html"}}>{`\
|
||||
<script src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js"></script>`}
|
||||
</code></pre>
|
||||
|
||||
3) Add a button that users will click to generate an export
|
||||
|
||||
@ -109,11 +111,11 @@ support for CSS styling and rich text.
|
||||
<div id="TableContainer"></div>
|
||||
```
|
||||
|
||||
2) Include a reference to the SheetJS Library in your page:
|
||||
2) Include a reference to the SheetJS library in your page:
|
||||
|
||||
```html
|
||||
<script src="https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js"></script>
|
||||
```
|
||||
<pre><code parentName="pre" {...{"className": "language-html"}}>{`\
|
||||
<script src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js"></script>`}
|
||||
</code></pre>
|
||||
|
||||
3) Add a script block to download and update the page:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user