Demo refresh

This commit is contained in:
SheetJS 2025-06-09 15:48:33 -04:00
parent 8a65ff5698
commit 4e3a0637ea
13 changed files with 134 additions and 63 deletions

@ -16,7 +16,7 @@ Each standalone release script is available at https://cdn.sheetjs.com/.
<CodeBlock language="html">{`\
<!-- use version ${current} -->
<script lang="javascript" src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js"></script>`}
<script type="text/javascript" src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js"></script>`}
</CodeBlock>
:::tip pass
@ -44,7 +44,7 @@ reading and writing many spreadsheet formats.
<CodeBlock language="html">{`\
<!-- use xlsx.full.min.js from version ${current} -->
<script lang="javascript" src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js"></script>`}
<script type="text/javascript" src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js"></script>`}
</CodeBlock>
`xlsx.mini.min.js` is a slimmer build that omits the following features:
@ -60,7 +60,7 @@ A single script tag should be added at the top of the HTML page:
<CodeBlock language="html">{`\
<!-- use xlsx.mini.min.js from version ${current} -->
<script lang="javascript" src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.mini.min.js"></script>`}
<script type="text/javascript" src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.mini.min.js"></script>`}
</CodeBlock>
</details>

@ -854,7 +854,7 @@ npm i --save https://sheet.lol/balls/xlsx-${current}.tgz`}
4) Install dependencies:
```bash
npm i --save @langchain/core@0.3.44 langchain@0.3.21 @langchain/ollama@0.2.0 peggy@3.0.2
npm i --save @langchain/core@0.3.57 langchain@0.3.21 @langchain/ollama@0.2.1 peggy@3.0.2
```
:::note pass
@ -863,7 +863,7 @@ In some test runs, there were error messages relating to dependency and peer
dependency versions. The `--force` flag will suppress version mismatch errors:
```bash
npm i --save @langchain/core@0.3.44 langchain@0.3.21 @langchain/ollama@0.2.0 peggy@3.0.2 --force
npm i --save @langchain/core@0.3.57 langchain@0.3.21 @langchain/ollama@0.2.1 peggy@3.0.2 --force
```
:::

@ -71,7 +71,7 @@ can be loaded after the TF.js standalone script.
<!-- latest version of TF.js -->
<script src="https://unpkg.com/@tensorflow/tfjs@latest/dist/tf.min.js"></script>
<!-- use version ${current} -->
<script lang="javascript" src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js"></script>`}
<script type="text/javascript" src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js"></script>`}
</CodeBlock>
#### Frameworks and Bundlers

@ -53,7 +53,7 @@ can be loaded in the root HTML page (typically `wwwroot/index.html`):
<CodeBlock language="html">{`\
<!-- use version ${current} -->
<script lang="javascript" src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js"></script>`}
<script type="text/javascript" src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js"></script>`}
</CodeBlock>
#### ECMAScript Module

@ -25,9 +25,9 @@ the shim script must be loaded first:
<CodeBlock language="html">{`\
<!-- SheetJS version ${current} \`shim.min.js\` -->
<script lang="javascript" src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js"></script>
<script type="text/javascript" src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js"></script>
<!-- SheetJS version ${current} \`xlsx.full.min.js\` -->
<script lang="javascript" src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js"></script>
<script type="text/javascript" src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js"></script>
<script>
/* display SheetJS version */
if(typeof console == "object" && console.log) console.log(XLSX.version);

@ -47,22 +47,23 @@ This demo was tested in the following environments:
| ESBuild | Date |
|:----------|:-----------|
| `0.24.2` | 2025-01-07 |
| `0.23.1` | 2025-01-07 |
| `0.22.0` | 2025-01-07 |
| `0.21.5` | 2025-01-07 |
| `0.20.2` | 2025-01-07 |
| `0.19.12` | 2025-01-07 |
| `0.18.20` | 2025-01-07 |
| `0.17.19` | 2025-01-07 |
| `0.16.17` | 2025-01-07 |
| `0.15.18` | 2025-01-07 |
| `0.14.54` | 2025-01-07 |
| `0.13.15` | 2025-01-07 |
| `0.12.29` | 2025-01-07 |
| `0.11.23` | 2025-01-07 |
| `0.10.2` | 2025-01-07 |
| `0.9.7` | 2025-01-07 |
| `0.25.5` | 2025-06-02 |
| `0.24.2` | 2025-06-02 |
| `0.23.1` | 2025-06-02 |
| `0.22.0` | 2025-06-02 |
| `0.21.5` | 2025-06-02 |
| `0.20.2` | 2025-06-02 |
| `0.19.12` | 2025-06-02 |
| `0.18.20` | 2025-06-02 |
| `0.17.19` | 2025-06-02 |
| `0.16.17` | 2025-06-02 |
| `0.15.18` | 2025-06-02 |
| `0.14.54` | 2025-06-02 |
| `0.13.15` | 2025-06-02 |
| `0.12.29` | 2025-06-02 |
| `0.11.23` | 2025-06-02 |
| `0.10.2` | 2025-06-02 |
| `0.9.7` | 2025-06-02 |
:::
@ -90,7 +91,7 @@ Assuming the primary source file is `in.js`, the following command will bundle
the script and generate `out.js`:
```bash
npx -y esbuild@0.24.2 in.js --bundle --outfile=out.js
npx -y esbuild@0.25.5 in.js --bundle --outfile=out.js
```
### Browser Demo
@ -139,7 +140,7 @@ curl -LO https://docs.sheetjs.com/esbuild/esbrowser.js
4) Create bundle:
```bash
npx -y esbuild@0.19.8 esbrowser.js --bundle --outfile=esb.browser.js
npx -y esbuild@0.25.5 esbrowser.js --bundle --outfile=esb.browser.js
```
5) Start a local HTTP server:
@ -179,7 +180,7 @@ Assuming the primary source file is `in.js`, the following command will bundle
the script for NodeJS and generate `out.js`:
```bash
npx -y esbuild@0.19.8 in.js --bundle --platform=node --outfile=out.js
npx -y esbuild@0.25.5 in.js --bundle --platform=node --outfile=out.js
```
### NodeJS Demo
@ -228,7 +229,7 @@ curl -LO https://docs.sheetjs.com/esbuild/esbnode.js
3) Create bundle:
```bash
npx -y esbuild@0.19.8 esbnode.js --bundle --platform=node --outfile=esb.node.js
npx -y esbuild@0.25.5 esbnode.js --bundle --platform=node --outfile=esb.node.js
```
4) Run the bundle:

@ -241,7 +241,7 @@ This demo was tested in the following environments:
|:-----------|:--------------------|:---------|:-------------|:-----------|
| Android 34 | Pixel 3a | `0.76.8` | `darwin-arm` | 2025-03-26 |
| iOS 18.3 | iPhone 16 Pro | `0.76.8` | `darwin-arm` | 2025-03-26 |
| Android 35 | Pixel 9 | `0.76.5` | `win11-x64` | 2024-12-22 |
| Android 35 | Pixel 9 Pro XL | `0.79.2` | `win11-x64` | 2025-06-08 |
| Android 35 | Pixel 9 | `0.76.5` | `linux-x64` | 2025-01-02 |
:::
@ -289,7 +289,7 @@ export JAVA_HOME=/usr/lib/jvm/java-17-openjdk
1) Create project:
```bash
npx -y @react-native-community/cli@15 init SheetJSRNFetch --version="0.76.8"
npx -y @react-native-community/cli@18 init SheetJSRNFetch --version="0.79.2"
```
On macOS, if prompted to install `CocoaPods`, press <kbd>Y</kbd>
@ -330,12 +330,47 @@ npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz
npm i -S https://cdn.sheetjs.com/react-native-tabeller-0.1.0/react-native-tabeller-0.1.0.tgz`}
</CodeBlock>
:::note pass
In PowerShell, the command may fail with a parameter error:
```
Invoke-WebRequest : A parameter cannot be found that matches parameter name 'LO'.
```
`curl.exe` must be invoked directly:
<CodeBlock language="bash">{`\
cd SheetJSRNFetch
curl.exe -LO https://docs.sheetjs.com/logo.png
npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz
npm i -S https://cdn.sheetjs.com/react-native-tabeller-0.1.0/react-native-tabeller-0.1.0.tgz`}
</CodeBlock>
:::
3) Download and replace [`App.tsx`](pathname:///reactnative/App.tsx):
```bash
curl -LO https://docs.sheetjs.com/reactnative/App.tsx
```
:::note pass
In PowerShell, the command may fail with a parameter error:
```
Invoke-WebRequest : A parameter cannot be found that matches parameter name 'LO'.
```
`curl.exe` must be invoked directly:
```bash
curl.exe -LO https://docs.sheetjs.com/reactnative/App.tsx
```
:::
**Android Testing**
4) Install or switch to Java 17[^7]
@ -1096,7 +1131,7 @@ This demo was tested in the following environments:
|:-----------|:------------------|:---------|:-------------|:-----------|
| Android 34 | Pixel 3a | `0.76.5` | `darwin-arm` | 2025-01-05 |
| iOS 18.2 | iPhone 16 Pro | `0.76.5` | `darwin-arm` | 2025-01-05 |
| Android 35 | Pixel 9 | `0.76.5` | `win11-x64` | 2024-12-22 |
| Android 35 | Pixel 9 Pro XL | `0.76.5` | `win11-x64` | 2025-06-08 |
| Android 35 | Pixel 9 | `0.76.5` | `linux-x64` | 2025-01-02 |
:::
@ -1128,15 +1163,50 @@ On macOS, if prompted to install `CocoaPods`, press <kbd>Y</kbd>
cd SheetJSRN
curl -LO https://docs.sheetjs.com/logo.png
npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz
npm i -S react-native-table-component@1.2.2 react-native-document-picker@9.3.1`}
npm i -S https://cdn.sheetjs.com/react-native-tabeller-0.1.0/react-native-tabeller-0.1.0.tgz react-native-document-picker@9.3.1`}
</CodeBlock>
:::note pass
In PowerShell, the command may fail with a parameter error:
```
Invoke-WebRequest : A parameter cannot be found that matches parameter name 'LO'.
```
`curl.exe` must be invoked directly:
<CodeBlock language="bash">{`\
cd SheetJSRN
curl.exe -LO https://docs.sheetjs.com/logo.png
npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz
npm i -S https://cdn.sheetjs.com/react-native-tabeller-0.1.0/react-native-tabeller-0.1.0.tgz react-native-document-picker@9.3.1`}
</CodeBlock>
:::
3) Download [`index.js`](pathname:///mobile/index.js) and replace:
```bash
curl -LO https://docs.sheetjs.com/mobile/index.js
```
:::note pass
In PowerShell, the command may fail with a parameter error:
```
Invoke-WebRequest : A parameter cannot be found that matches parameter name 'LO'.
```
`curl.exe` must be invoked directly:
```bash
curl.exe -LO https://docs.sheetjs.com/mobile/index.js
```
:::
4) Start the Android emulator:
```bash
@ -1192,13 +1262,13 @@ Stop the dev server and close the React Native Metro NodeJS window.
Install `react-native-blob-util` dependency:
```bash
npm i -S react-native-blob-util@0.21.2
npm i -S react-native-blob-util@0.22.2
```
Add the highlighted lines to `index.js`:
```js title="index.js"
import { Table, Row, Rows, TableWrapper } from 'react-native-table-component';
```js title="index.js (add highlighted lines)"
import { Table, Row, Rows, TableWrapper } from 'react-native-tabeller';
// highlight-start
import { read, write } from 'xlsx';
@ -1246,7 +1316,7 @@ npm i -S react-native-file-access@3.1.1
Add the highlighted lines to `index.js`:
```js title="index.js"
import { Table, Row, Rows, TableWrapper } from 'react-native-table-component';
import { Table, Row, Rows, TableWrapper } from 'react-native-tabeller';
// highlight-start
import { read, write } from 'xlsx';
@ -1313,7 +1383,7 @@ These errors can be ignored.
Add the highlighted lines to `index.js`:
```js title="index.js"
import { Table, Row, Rows, TableWrapper } from 'react-native-table-component';
import { Table, Row, Rows, TableWrapper } from 'react-native-tabeller';
// highlight-start
import { read, write } from 'xlsx';
@ -1687,7 +1757,7 @@ The Numbers app will load the spreadsheet, confirming that the file is valid.
[^3]: See ["Array Output" in "Utility Functions"](/docs/api/utilities/array#array-output)
[^4]: See ["Array of Arrays Input" in "Utility Functions"](/docs/api/utilities/array#array-of-arrays-input)
[^5]: React-Native commit [`5b597b5`](https://github.com/facebook/react-native/commit/5b597b5ff94953accc635ed3090186baeecb3873) added the final piece required for `fetch` support. It is available in official releases starting from `0.72.0`.
[^6]: See [the compatibility table](https://github.com/react-native-community/cli) in the CLI project repository to determine which version of `@react-native-community/cli` is required for a given `react-native` version.
[^6]: See [the compatibility table](https://github.com/react-native-community/cli/blob/main/README.md#compatibility) in the CLI project repository to determine which version of `@react-native-community/cli` is required for a given `react-native` version.
[^7]: When the demo was last tested, the Temurin distribution of Java 17 was installed through the macOS Brew package manager by running `brew install temurin17`. [Direct downloads are available at `adoptium.net`](https://adoptium.net/temurin/releases/?version=17)
[^8]: See ["Running On Device"](https://reactnative.dev/docs/running-on-device) in the React Native documentation
[^9]: See [`UIFileSharingEnabled`](https://developer.apple.com/documentation/bundleresources/information_property_list/uifilesharingenabled) in the Apple Developer Documentation.

@ -65,7 +65,7 @@ This demo was tested in the following environments:
|:-----------|:--------------------|:---------|:-------------|:-----------|
| Android 35 | Pixel 9 Pro XL | `8.9.2` | `darwin-x64` | 2025-05-06 |
| iOS 18.4 | iPhone 16 Pro Max | `8.9.2` | `darwin-x64` | 2025-05-06 |
| Android 35 | Pixel 9 | `8.8.3` | `win11-x64` | 2024-12-21 |
| Android 35 | Pixel 9 | `8.9.2` | `win11-x64` | 2025-06-08 |
| Android 35 | Pixel 9 | `8.8.3` | `linux-x64` | 2025-01-02 |
:::
@ -434,11 +434,11 @@ SheetJS version string and adds it to a `version` variable in the component:
```ts title="src/app/item/items.component.ts (add highlighted lines)"
// highlight-next-line
import { version } from 'xlsx';
import { Component, OnInit } from '@angular/core'
import { Component, NO_ERRORS_SCHEMA, inject } from '@angular/core'
// ...
export class ItemsComponent implements OnInit {
export class ItemsComponent {
// highlight-next-line
version = `SheetJS - ${version}`;
itemService = inject(ItemService)

@ -53,7 +53,7 @@ This demo was tested in the following environments:
|:-----------|:--------------------|:------------------|:-------------|:-----------|
| Android 34 | Pixel 3a | `7.1.0` / `7.0.0` | `darwin-arm` | 2025-03-30 |
| iOS 18.2 | iPhone 16 Pro Max | `7.1.0` / `7.0.0` | `darwin-arm` | 2025-03-30 |
| Android 35 | Pixel 9 | `6.2.0` / `6.0.2` | `win11-x64` | 2024-12-21 |
| Android 35 | Pixel 9 Pro XL | `7.3.0` / `7.1.1` | `win11-x64` | 2025-06-08 |
| Android 35 | Pixel 9 | `6.2.0` / `6.0.2` | `linux-x64` | 2025-01-02 |
:::
@ -63,13 +63,13 @@ This demo was tested in the following environments:
Before starting this demo, manually disable telemetry. On Linux and MacOS:
```bash
npx @capacitor/cli telemetry off
npx -y @capacitor/cli telemetry off
```
To verify telemetry was disabled:
```bash
npx @capacitor/cli telemetry
npx -y @capacitor/cli telemetry
```
:::
@ -224,13 +224,13 @@ Java 20 was required to support Gradle `8.2.1`.
1) Disable telemetry.
```bash
npx @capacitor/cli telemetry off
npx -y @capacitor/cli telemetry off
```
Verify that telemetry is disabled by running
```bash
npx @capacitor/cli telemetry
npx -y @capacitor/cli telemetry
```
(it should print `Telemetry is off`)
@ -265,7 +265,7 @@ If prompted to create an Ionic account, type `N` and press <kbd>Enter</kbd>.
5) Download [`src/App.svelte`](pathname:///cap/App.svelte) and replace:
```bash
curl -o src/App.svelte -L https://docs.sheetjs.com/cap/App.svelte
curl -o src/App.svelte https://docs.sheetjs.com/cap/App.svelte
```
### Android

@ -46,8 +46,8 @@ This demo was tested in the following environments:
| OS and Version | Architecture | RN Platform | Date |
|:---------------|:-------------|:------------|:-----------|
| Windows 11 C++ | `win11-x64` | `v0.75.11` | 2024-12-22 |
| Windows 11 C# | `win11-x64` | `v0.75.11` | 2024-12-22 |
| Windows 11 C++ | `win11-x64` | `v0.78.8` | 2025-06-08 |
| Windows 11 C# | `win11-x64` | `v0.78.8` | 2025-06-08 |
| Windows 11 C++ | `win11-arm` | `v0.77.2` | 2025-02-23 |
| Windows 11 C# | `win11-arm` | `v0.77.2` | 2025-02-23 |
| MacOS 15.3.2 | `darwin-x64` | `v0.76.7` | 2025-03-31 |
@ -432,12 +432,12 @@ not a requirement for this demo.
### Project Setup
1) Create a new project using React Native `0.77.1`:
1) Create a new project using React Native `0.78.2`:
```bash
npx -y @react-native-community/cli@16 init SheetJSWin --version="0.77.1"
npx -y @react-native-community/cli@15 init SheetJSWin --version="0.78.2"
cd SheetJSWin
npm install --save react-native-windows@0.77.2
npm install --save react-native-windows@0.78.8
```
:::info pass
@ -500,7 +500,7 @@ npx react-native run-windows --no-telemetry
When the demo was tested in Windows 11, the run step failed with the message:
> The Windows SDK version `10.0.19041.0` was not found
> The Windows SDK version `10.0.22621.0` was not found
Specific Windows SDK versions can be installed through Visual Studio Installer.
@ -558,7 +558,7 @@ iwr -Uri https://docs.sheetjs.com/reactnative/DocumentPicker.cs -OutFile windows
```
</TabItem>
<TabItem value="bash" label="WSL Bash">
<TabItem value="bash" label="WSL Bash / Command Prompt">
```bash
curl -Lo windows/SheetJSWin/DocumentPicker.cs https://docs.sheetjs.com/reactnative/DocumentPicker.cs
@ -595,7 +595,7 @@ iwr -Uri https://docs.sheetjs.com/reactnative/DocumentPicker.h -OutFile windows/
```
</TabItem>
<TabItem value="bash" label="WSL Bash">
<TabItem value="bash" label="WSL Bash / Command Prompt">
```bash
curl -Lo windows/SheetJSWin/DocumentPicker.h https://docs.sheetjs.com/reactnative/DocumentPicker.h
@ -631,7 +631,7 @@ iwr -Uri https://docs.sheetjs.com/reactnative/rnw/App.tsx -OutFile App.tsx
```
</TabItem>
<TabItem value="bash" label="WSL Bash">
<TabItem value="bash" label="WSL Bash / Command Prompt">
```bash
rm App.js

@ -24,10 +24,10 @@ This demo was verified by NetSuite consultants in the following deployments:
| `@NScriptType` | `@NApiVersion` | Date |
|:----------------|:---------------|:-----------|
| ScheduledScript | 2.1 | 2024-12-06 |
| Restlet | 2.1 | 2024-12-06 |
| Suitelet | 2.1 | 2024-12-06 |
| MapReduceScript | 2.1 | 2024-12-06 |
| ScheduledScript | 2.1 | 2025-06-08 |
| Restlet | 2.1 | 2025-06-08 |
| Suitelet | 2.1 | 2025-06-08 |
| MapReduceScript | 2.1 | 2025-06-08 |
:::

@ -2,7 +2,7 @@
import { utils } from 'xlsx';
import React, { Component } from 'react';
import { AppRegistry, StyleSheet, Text, Button, Alert, Image, ScrollView } from 'react-native';
import { Table, Row, Rows, TableWrapper } from 'react-native-table-component';
import { Table, Row, Rows, TableWrapper } from 'react-native-tabeller';
const make_width = ws => {
const aoa = utils.sheet_to_json(ws, {header:1}), res = [];

@ -40,7 +40,7 @@ app.listen(7262, async() => {
});
EOF
for n in 0.{9..24}; do
for n in 0.{9..25}; do
npx -y esbuild@$n --version
## Browser Test