demo refresh
This commit is contained in:
parent
e996b02688
commit
7b5a73be0d
@ -172,8 +172,8 @@
|
||||
<Cell><Data ss:Type="String">Perl</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✱</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✱</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✘</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
</Row>
|
||||
@ -182,8 +182,8 @@
|
||||
<Cell><Data ss:Type="String">C</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✱</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✱</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
</Row>
|
||||
@ -273,7 +273,7 @@
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"/>
|
||||
<Cell ss:StyleID="s16"/>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
</Row>
|
||||
@ -303,7 +303,7 @@
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✘</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
</Row>
|
||||
@ -383,7 +383,7 @@
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✱</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
|
||||
</Row>
|
||||
|
||||
@ -40,9 +40,9 @@ This browser demo was tested in the following environments:
|
||||
|
||||
| Browser | Date |
|
||||
|:-------------|:-----------|
|
||||
| Chromium 133 | 2025-03-30 |
|
||||
| Safari 18.3 | 2025-03-30 |
|
||||
| Konqueror 22 | 2025-04-23 |
|
||||
| Chromium 146 | 2026-05-07 |
|
||||
| Safari 26.2 | 2026-05-07 |
|
||||
| Konqueror 25 | 2026-05-07 |
|
||||
|
||||
:::
|
||||
|
||||
|
||||
@ -297,8 +297,8 @@ This demo was tested in the following deployments:
|
||||
|:-------------|:-----------|
|
||||
| `darwin-x64` | 2026-03-07 |
|
||||
| `darwin-arm` | 2026-03-07 |
|
||||
| `win11-x64` | 2025-04-17 |
|
||||
| `win11-arm` | 2025-04-24 |
|
||||
| `win11-x64` | 2026-05-08 |
|
||||
| `win11-arm` | 2026-05-09 |
|
||||
|
||||
:::
|
||||
|
||||
|
||||
@ -338,7 +338,7 @@ The script will create a file `SheetJSCheerio.xlsx` that can be opened.
|
||||
### DenoDOM
|
||||
|
||||
[DenoDOM](https://deno.land/x/deno_dom) provides a DOM framework for Deno. For
|
||||
the tested version (`0.1.48`), the following patches were needed:
|
||||
the tested version (`0.1.56`), the following patches were needed:
|
||||
|
||||
- TABLE `rows` property (explained above)
|
||||
- TR `cells` property (explained above)
|
||||
@ -349,7 +349,7 @@ This example fetches [a sample table](pathname:///dom/SheetJSTable.html):
|
||||
// @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';
|
||||
\n\
|
||||
import { DOMParser } from 'https://deno.land/x/deno_dom@v0.1.48/deno-dom-wasm.ts';
|
||||
import { DOMParser } from 'https://deno.land/x/deno_dom@v0.1.56/deno-dom-wasm.ts';
|
||||
\n\
|
||||
const doc = new DOMParser().parseFromString(
|
||||
await (await fetch('https://docs.sheetjs.com/dom/SheetJSTable.html')).text(),
|
||||
@ -376,7 +376,7 @@ This demo was tested in the following deployments:
|
||||
|:-------------|:--------|:-------|:-----------|
|
||||
| `darwin-x64` | 0.1.48 | 2.7.4 | 2026-03-07 |
|
||||
| `darwin-arm` | 0.1.48 | 2.7.4 | 2026-03-12 |
|
||||
| `win11-x64` | 0.1.48 | 2.2.12 | 2025-04-28 |
|
||||
| `win11-x64` | 0.1.56 | 2.7.14 | 2026-05-09 |
|
||||
| `win11-arm` | 0.1.48 | 2.7.7 | 2026-03-22 |
|
||||
| `linux-x64` | 0.1.48 | 2.7.4 | 2026-03-07 |
|
||||
| `linux-arm` | 0.1.48 | 2.7.4 | 2026-03-07 |
|
||||
|
||||
@ -32,7 +32,7 @@ This demo was tested in the following deployments:
|
||||
|:-------------|:--------|:----------|:-----------|
|
||||
| `darwin-x64` | `3.0.0` | `25.8.0` | 2026-03-08 |
|
||||
| `darwin-arm` | `3.0.0` | `23.11.0` | 2026-03-13 |
|
||||
| `win11-x64` | `2.4.4` | `16.20.2` | 2025-05-07 |
|
||||
| `win11-x64` | `3.0.0` | `22.22.2` | 2026-05-08 |
|
||||
| `linux-x64` | `3.0.0` | `25.8.0` | 2026-03-08 |
|
||||
| `linux-arm` | `2.4.4` | `23.8.0` | 2025-02-15 |
|
||||
|
||||
@ -121,20 +121,20 @@ npx -y boxednode@2.4.4 -s xlsx-cli.js -t xlsx-cli -n 23.8.0
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
|
||||
```bash
|
||||
npx -y boxednode@2.4.4 -s xlsx-cli.js -t xlsx-cli.exe -n 16.20.2
|
||||
```
|
||||
|
||||
:::info pass
|
||||
|
||||
The Windows builds require Visual Studio with "Desktop development with C++"
|
||||
workload, Python 3.11, and NASM[^2].
|
||||
Windows x64 builds require Visual Studio with the "Desktop development with C++"
|
||||
workload, Python 3.11.9, and NASM[^2].
|
||||
|
||||
**The build command must be run in "x64 Native Tools Command Prompt"**
|
||||
|
||||
:::
|
||||
|
||||
:::caution pass
|
||||
```bash
|
||||
npx -y boxednode@3.0.0 -s xlsx-cli.js -t xlsx-cli.exe -n 22.22.2
|
||||
```
|
||||
|
||||
:::caution Troubleshooting
|
||||
|
||||
In some test runs, the build failed:
|
||||
|
||||
@ -158,25 +158,21 @@ Please use python3.11 or python3.10 or python3.9 or python3.8 or python3.7 or py
|
||||
|
||||
In the most recent test, Python 3.11.8 was installed from the official site.
|
||||
|
||||
:::
|
||||
---
|
||||
|
||||
:::caution pass
|
||||
|
||||
When the demo was last tested on Windows, the build failed:
|
||||
In some test runs, the build failed with error code `MSB8020`:
|
||||
|
||||
```
|
||||
error MSB8020: The build tools for Visual Studio 2019 (Platform Toolset = 'v142') cannot be found. To build using the v142 build tools, please install Visual Studio 2019 build tools.
|
||||
error MSB8020: The build tools for Visual Studio 2019 (Platform Toolset = 'v143') cannot be found. To build using the v143 build tools, please install Visual Studio 2019 build tools.
|
||||
```
|
||||
|
||||
This error was fixed by installing the following components from Visual Studio:
|
||||
|
||||
- `C++/CLI support for v142 build tools`
|
||||
- `MSVC v142 - VS 2019 - C++ x64/x86 build tools`
|
||||
- `MSVC v142 - VS 2019 - C++ x64/x86 Spectre-mitigated libs`
|
||||
- `C++/CLI support for v143 build tools`
|
||||
- `MSVC v143 - VS 2022 - C++ x64/x86 build tools`
|
||||
- `MSVC v143 - VS 2022 - C++ x64/x86 Spectre-mitigated libs`
|
||||
|
||||
:::
|
||||
|
||||
:::caution pass
|
||||
---
|
||||
|
||||
In the most recent Windows test against NodeJS `20.8.0`, the build failed due
|
||||
to an issue in the OpenSSL dependency:
|
||||
@ -186,8 +182,8 @@ to an issue in the OpenSSL dependency:
|
||||
```
|
||||
|
||||
SheetJS libraries are compatible with NodeJS versions dating back to `v0.8`. The
|
||||
workaround is to select NodeJS `v16.20.2` using the `-n` flag. This version was
|
||||
was chosen since NodeJS `v18` upgraded the OpenSSL dependency.
|
||||
workaround is to select NodeJS `v22.22.2` using the `-n` flag. In previous test
|
||||
runs, the recommended version was `v16.20.2`.
|
||||
|
||||
:::
|
||||
|
||||
|
||||
@ -1141,6 +1141,7 @@ This demo was tested in the following deployments:
|
||||
|:-------------|:--------|:-----------|
|
||||
| `darwin-x64` | `2.2.0` | 2026-01-21 |
|
||||
| `darwin-arm` | `2.2.0` | 2026-03-07 |
|
||||
| `win11-arm` | `2.2.0` | 2026-05-09 |
|
||||
| `linux-x64` | `2.2.0` | 2025-04-21 |
|
||||
| `linux-arm` | `2.2.0` | 2026-03-07 |
|
||||
|
||||
@ -1162,7 +1163,7 @@ sudo pacman -S libxcrypt
|
||||
1) Install the `JavaScript::Duktape::XS` library:
|
||||
|
||||
```bash
|
||||
cpan install JavaScript::Duktape::XS
|
||||
cpan install -T JavaScript::Duktape::XS
|
||||
```
|
||||
|
||||
:::note pass
|
||||
@ -1181,6 +1182,23 @@ sudo cpan install JavaScript::Duktape::XS
|
||||
curl -LO https://docs.sheetjs.com/duk/SheetJSDuk.pl
|
||||
```
|
||||
|
||||
:::caution pass
|
||||
|
||||
PowerShell `curl` is incompatible with the official `curl` program. The command
|
||||
may fail with a parameter error:
|
||||
|
||||
```
|
||||
Invoke-WebRequest : A parameter cannot be found that matches parameter name 'LO'.
|
||||
```
|
||||
|
||||
`curl.exe` must be used instead:
|
||||
|
||||
```bash
|
||||
curl.exe -LO https://docs.sheetjs.com/duk/SheetJSDuk.pl
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
3) Download the SheetJS ExtendScript build and test file:
|
||||
|
||||
<CodeBlock language="bash">{`\
|
||||
@ -1188,6 +1206,24 @@ curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.extendscript.
|
||||
curl -LO https://docs.sheetjs.com/pres.xlsx`}
|
||||
</CodeBlock>
|
||||
|
||||
:::caution pass
|
||||
|
||||
PowerShell `curl` is incompatible with the official `curl` program. The command
|
||||
may fail with a parameter error:
|
||||
|
||||
```
|
||||
Invoke-WebRequest : A parameter cannot be found that matches parameter name 'LO'.
|
||||
```
|
||||
|
||||
`curl.exe` must be used instead:
|
||||
|
||||
<CodeBlock language="bash">{`\
|
||||
curl.exe -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.extendscript.js
|
||||
curl.exe -LO https://docs.sheetjs.com/pres.xlsx`}
|
||||
</CodeBlock>
|
||||
|
||||
:::
|
||||
|
||||
4) Run the script:
|
||||
|
||||
```bash
|
||||
@ -1237,39 +1273,12 @@ This demo was tested in the following deployments:
|
||||
| `darwin-x64` | `2.2.1` | 2026-01-21 |
|
||||
| `darwin-arm` | `2.2.1` | 2026-03-07 |
|
||||
| `win11-x64` | `2.2.1` | 2026-02-02 |
|
||||
| `win11-arm` | `2.2.1` | 2026-02-02 |
|
||||
| `win11-arm` | `2.2.1` | 2026-05-09 |
|
||||
| `linux-x64` | `2.2.1` | 2026-01-08 |
|
||||
| `linux-arm` | `2.2.1` | 2026-03-07 |
|
||||
|
||||
:::
|
||||
|
||||
:::caution pass
|
||||
|
||||
The `ducc` crate cannot compile Duktape from source in Windows on ARM, so the
|
||||
x64 Rust toolchain must be used through the X64 compatibility layer.
|
||||
|
||||
<details>
|
||||
<summary><b>Windows on ARM steps</b> (click to show)</summary>
|
||||
|
||||
The following commands switch to the X64 toolchain:
|
||||
|
||||
```pwsh
|
||||
rustup toolchain install stable-x86_64-pc-windows-msvc --force-non-host
|
||||
rustup default stable-x86_64-pc-windows-msvc --force-non-host
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
The following command switches back to the native toolchain:
|
||||
|
||||
```pwsh
|
||||
rustup default stable
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
:::
|
||||
|
||||
1) Create a new project:
|
||||
|
||||
```bash
|
||||
@ -1338,6 +1347,22 @@ If the program succeeded, the CSV contents will be printed to console and the
|
||||
file `sheetjsw.xlsb` will be created. That file can be opened with a spreadsheet
|
||||
editor that supports XLSB spreadsheets.
|
||||
|
||||
:::caution pass
|
||||
|
||||
When this demo was last tested on Windows on ARM, the build step failed:
|
||||
|
||||
```
|
||||
fatal error C1189: #error: cannot determine intptr type
|
||||
```
|
||||
|
||||
The macro `DUK_F_ARM64` must be manually defined through the `CFLAGS` variable:
|
||||
|
||||
```cmd
|
||||
set CFLAGS=/DDUK_F_ARM64
|
||||
cargo run -- pres.numbers
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
[^1]: See [Foreign Function Interface](https://www.php.net/manual/en/book.ffi.php) in the PHP documentation.
|
||||
[^2]: See [`ctypes`](https://docs.python.org/3/library/ctypes.html) in the Python documentation.
|
||||
@ -167,7 +167,7 @@ This demo was tested in the following deployments:
|
||||
| `darwin-arm` | `4.6.3` | 2026-03-22 |
|
||||
| `win11-x64` | `4.6.3` | 2026-05-05 |
|
||||
| `win11-arm` | `4.6.3` | 2026-03-22 |
|
||||
| `linux-x64` | `4.2.2` | 2025-06-16 |
|
||||
| `linux-x64` | `4.8.0` | 2026-05-07 |
|
||||
| `linux-arm` | `4.5.0` | 2026-03-07 |
|
||||
|
||||
:::
|
||||
@ -248,12 +248,12 @@ dotnet run
|
||||
|
||||
```bash
|
||||
dotnet nuget add source https://www.myget.org/F/jint/api/v3/index.json
|
||||
dotnet add package Jint --version 4.6.3
|
||||
dotnet add package Jint --version 4.8.0
|
||||
```
|
||||
|
||||
To verify Jint is installed, replace `Program.cs` with the following:
|
||||
|
||||
```csharp title="Program.cs"
|
||||
```csharp title="Program.cs (replace contents)"
|
||||
var engine = new Jint.Engine();
|
||||
Console.WriteLine("Hello {0}", engine.Evaluate("'Sheet' + 'JS'"));
|
||||
```
|
||||
@ -304,7 +304,7 @@ curl.exe -LO https://docs.sheetjs.com/pres.xlsx`}
|
||||
|
||||
6) Replace `Program.cs` with the following:
|
||||
|
||||
```csharp title="Program.cs"
|
||||
```csharp title="Program.cs (replace contents)"
|
||||
var engine = new Jint.Engine();
|
||||
engine.Evaluate("global = globalThis;");
|
||||
engine.Evaluate(File.ReadAllText("shim.min.js"));
|
||||
@ -324,7 +324,7 @@ dotnet run
|
||||
|
||||
7) Replace `Program.cs` with the following:
|
||||
|
||||
```csharp title="Program.cs"
|
||||
```csharp title="Program.cs (replace contents)"
|
||||
using Jint;
|
||||
|
||||
/* Initialize Jint */
|
||||
|
||||
@ -613,7 +613,7 @@ contents of the first sheet as CSV rows.
|
||||
|
||||
:::info pass
|
||||
|
||||
On ARM64, the commands must be run in a "ARM64 Native Tools Command Prompt".
|
||||
The commands must be run in a "Native Tools Command Prompt".
|
||||
|
||||
:::
|
||||
|
||||
@ -647,17 +647,14 @@ settings pane, scroll down and turn off the alias for `python.exe`.
|
||||
|
||||
:::
|
||||
|
||||
1) Set up `depot_tools`.
|
||||
1) Set up `depot_tools` to `c:\src\`:
|
||||
|
||||
[`depot_tools.zip`](https://storage.googleapis.com/chrome-infra/depot_tools.zip)
|
||||
must be downloaded and extracted to `c:\src\depot_tools\`.
|
||||
|
||||
:::note pass
|
||||
|
||||
This ZIP has a number of hidden files and folders (including `.git`) which
|
||||
should be extracted along with the normal files.
|
||||
|
||||
:::
|
||||
```cmd
|
||||
cd c:\
|
||||
mkdir src
|
||||
cd src
|
||||
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
```
|
||||
|
||||
Add the path `c:\src\depot_tools\` to the User `PATH` environment variable
|
||||
|
||||
@ -680,7 +677,7 @@ Click "OK" in each window (3 windows) and restart your computer.
|
||||
</details>
|
||||
|
||||
2) Delete `c:\src\depot_tools\ninja` if it exists, then download the
|
||||
[official Windows release](https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-win.zip)
|
||||
[official Windows release](https://github.com/ninja-build/ninja/releases/download/v1.13.2/ninja-win.zip)
|
||||
and move the `ninja.exe` into `c:\src\depot_tools`. If a `ninja.exe` exists in
|
||||
the folder, replace the existing program.
|
||||
|
||||
@ -720,13 +717,13 @@ git config --global http.sslVerify true
|
||||
|
||||
```bash
|
||||
cd hermes-windows
|
||||
.\.ado\scripts\cibuild.ps1 -AppPlatform win32 -Platform x64 -ToolsPlatform x64
|
||||
powershell .\.ado\scripts\cibuild.ps1 -AppPlatform win32 -Platform x64 -ToolsPlatform x64
|
||||
cd ..
|
||||
```
|
||||
|
||||
:::note pass
|
||||
|
||||
The script may fail with the message:
|
||||
The build may fail with the message:
|
||||
|
||||
> cannot be loaded because running scripts is disabled on this system
|
||||
|
||||
@ -767,28 +764,15 @@ cmake --build ./build
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
6) Copy every generated `.lib` and `.dll` file into the main folder. The
|
||||
following commands should be run in a PowerShell session:
|
||||
|
||||
<Tabs groupId="arch">
|
||||
<TabItem value="x64" label="x64">
|
||||
6) Copy every generated `.lib` and `.dll` file into the main folder:
|
||||
|
||||
```powershell
|
||||
dir -r -Path .\hermes-windows\workspace\build\win32-x64-debug\ -Filter "*.dll" | Copy-Item -Destination .\
|
||||
dir -r -Path .\hermes-windows\workspace\build\win32-x64-debug\ -Filter "*.lib" | Copy-Item -Destination .\
|
||||
for /r build %f in (*.dll) do copy /Y "%f" .
|
||||
for /r build %f in (*.lib) do copy /Y "%f" .
|
||||
for /r hermes-windows %f in (*.dll) do copy /Y "%f" .
|
||||
for /r hermes-windows %f in (*.lib) do copy /Y "%f" .
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="arm" label="ARM64">
|
||||
|
||||
```powershell
|
||||
dir -r -Path .\build -Filter "*.dll" | Copy-Item -Destination .\
|
||||
dir -r -Path .\build -Filter "*.lib" | Copy-Item -Destination .\
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
7) Download [`sheetjs-hermes.cpp`](pathname:///hermes/sheetjs-hermesw.cpp):
|
||||
|
||||
```bash
|
||||
@ -801,12 +785,6 @@ curl -o sheetjs-hermesw.cpp https://docs.sheetjs.com/hermes/sheetjs-hermesw.cpp
|
||||
cl /MDd sheetjs-hermesw.cpp DbgHelp.lib *.lib /I hermes-windows\API /I hermes-windows\include /I hermes-windows\public\ /I hermes-windows\API\jsi icuuc.lib icuin.lib
|
||||
```
|
||||
|
||||
:::caution pass
|
||||
|
||||
If `cl` is not found, run the command in the "Native Tools Command Prompt"
|
||||
|
||||
:::
|
||||
|
||||
:::info pass
|
||||
|
||||
In some test runs, the build failed due to duplicate symbols:
|
||||
@ -855,7 +833,7 @@ This demo was tested in the following deployments:
|
||||
|:-------------|:---------|:-----------|
|
||||
| `darwin-x64` | `0.13.0` | 2026-03-06 |
|
||||
| `darwin-arm` | `0.13.0` | 2026-03-06 |
|
||||
| `win11-x64` | `0.13.0` | 2025-04-28 |
|
||||
| `win11-x64` | `0.13.0` | 2026-05-10 |
|
||||
| `win11-arm` | `0.13.0` | 2025-02-23 |
|
||||
| `linux-x64` | `0.13.0` | 2025-04-21 |
|
||||
| `linux-arm` | `0.13.0` | 2026-03-07 |
|
||||
@ -869,6 +847,12 @@ binary. Nevertheless, the process was tested using `qemu-user` to simulate the
|
||||
Due to limitations of the standalone binary, this demo will encode a test file
|
||||
as a Base64 string and directly add it to an amalgamated script.
|
||||
|
||||
:::info pass
|
||||
|
||||
In Windows, the demo should be run in "Command Prompt".
|
||||
|
||||
:::
|
||||
|
||||
#### Install CLI
|
||||
|
||||
0) Install the Hermes command line tools:
|
||||
@ -922,13 +906,19 @@ mkdir sheetjs-hermes-cli
|
||||
cd sheetjs-hermes-cli
|
||||
```
|
||||
|
||||
3) Copy the binary from Step 1 into the current folder. For example, on macOS:
|
||||
3) Copy the binary from Step 1 into the current folder.
|
||||
|
||||
<Tabs groupId="os">
|
||||
<TabItem value="unix" label="Linux/MacOS">
|
||||
|
||||
The typical location is `~/.jsvu/engines/hermes-0.13.0/hermes-0.13.0`:
|
||||
|
||||
```bash
|
||||
cp ~/.jsvu/engines/hermes-0.13.0/hermes-0.13.0 .
|
||||
```
|
||||
|
||||
:::note pass
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
|
||||
On Windows, all DLLs must be copied:
|
||||
|
||||
@ -937,7 +927,8 @@ copy %userprofile%\.jsvu\engines\hermes-0.13.0\hermes-0.13.0.exe .
|
||||
copy %userprofile%\.jsvu\engines\hermes-0.13.0\*.dll .
|
||||
```
|
||||
|
||||
:::
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
#### Create Script
|
||||
|
||||
@ -978,10 +969,24 @@ console.log(XLSX.utils.sheet_to_csv(wb.Sheets[wb.SheetNames[0]]));
|
||||
|
||||
7) Create the amalgamation `sheetjs.hermes.js`:
|
||||
|
||||
<Tabs groupId="os">
|
||||
<TabItem value="unix" label="Linux/MacOS">
|
||||
|
||||
```bash
|
||||
cat global.js xlsx.full.min.js payload.js hermes.js > sheetjs.hermes.js
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
|
||||
```cmd
|
||||
type global.js xlsx.full.min.js payload.js hermes.js > sheetjs.hermes.js
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
||||
The final script defines `global` before loading the standalone library. Once
|
||||
ready, it will read the bundled test data and print the contents as CSV.
|
||||
|
||||
|
||||
@ -89,14 +89,11 @@ This demo was tested in the following deployments:
|
||||
|:-------------|:---------|:---------|:-----------|
|
||||
| `darwin-x64` | `2.6.10` | `2.10.0` | 2026-01-21 |
|
||||
| `darwin-arm` | `2.6.10` | `2.10.0` | 2026-03-07 |
|
||||
| `win11-x64` | `3.3.8` | `2.10.0` | 2025-04-28 |
|
||||
| `win11-arm` | `3.2.3` | `2.10.0` | 2025-02-23 |
|
||||
| `win11-x64` | `4.0.3` | `2.10.1` | 2026-05-09 |
|
||||
| `win11-arm` | `4.0.3` | `2.10.1` | 2026-05-09 |
|
||||
| `linux-x64` | `3.3.8` | `2.10.0` | 2026-03-08 |
|
||||
| `linux-arm` | `3.3.8` | `2.10.0` | 2026-03-07 |
|
||||
|
||||
When the demo was last tested, there was no official Ruby release for Windows
|
||||
on ARM. The `win11-arm` test was run in WSL.
|
||||
|
||||
:::
|
||||
|
||||
0) Install Ruby, `gem` (RubyGems), and the dependencies:
|
||||
|
||||
@ -133,8 +133,8 @@ This demo was tested in the following deployments:
|
||||
|:-------------|:-----------|:-----------|
|
||||
| `darwin-x64` | `792ee76` | 2026-01-20 |
|
||||
| `darwin-arm` | `792ee76` | 2026-03-08 |
|
||||
| `win11-x64` | `36becec` | 2025-04-28 |
|
||||
| `win11-arm` | `e26c81f` | 2025-02-23 |
|
||||
| `win11-x64` | `97e68c9` | 2026-05-09 |
|
||||
| `win11-arm` | `97e68c9` | 2026-05-09 |
|
||||
| `linux-x64` | `792ee76` | 2026-03-08 |
|
||||
| `linux-arm` | `792ee76` | 2026-01-10 |
|
||||
|
||||
@ -204,7 +204,7 @@ The commands in this demo should be run in "ARM64 Native Tools Command Prompt".
|
||||
```bash
|
||||
git clone https://github.com/chakra-core/ChakraCore.git
|
||||
cd ChakraCore
|
||||
git checkout 792ee76
|
||||
git checkout 97e68c9
|
||||
cd ..
|
||||
```
|
||||
|
||||
@ -416,9 +416,9 @@ msbuild /m /p:Platform=x64 /p:Configuration=Debug /p:RuntimeLib=static_library B
|
||||
cd ..
|
||||
```
|
||||
|
||||
:::caution pass
|
||||
:::caution Troubleshooting
|
||||
|
||||
During some test runs, the build failed with a message referencing `cfguard.h`:
|
||||
In some test runs, the build failed with a message referencing `cfguard.h`:
|
||||
|
||||
```
|
||||
44>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\cfguard.h(44,1): error C2220: the following warning is treated as an error
|
||||
@ -474,7 +474,7 @@ cd ..
|
||||
|
||||
:::caution pass
|
||||
|
||||
During some test runs, the build failed with a message referencing `LegalizeMD.cpp`:
|
||||
In some test runs, the build failed with a message referencing `LegalizeMD.cpp`:
|
||||
|
||||
```
|
||||
...\ChakraCore\lib\Backend\arm64\LegalizeMD.cpp(323,16): warning C1489: 'fPostRegAlloc': local variable is initialized but not referenced [...]
|
||||
@ -606,7 +606,7 @@ If successful, the program will print the contents of the first sheet as CSV.
|
||||
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was last tested on 2026-01-10 against `ch` commit `792ee76`.
|
||||
This demo was last tested on 2026-05-09 against `ch` commit `97e68c9`.
|
||||
|
||||
:::
|
||||
|
||||
@ -660,19 +660,26 @@ console.log(XLSX.utils.sheet_to_csv(wb.Sheets[wb.SheetNames[0]]));
|
||||
|
||||
4) Create the amalgamation `xlsx.chakra.js`:
|
||||
|
||||
<Tabs groupId="os">
|
||||
<TabItem value="unix" label="Linux/MacOS">
|
||||
|
||||
```bash
|
||||
cat global.js xlsx.full.min.js payload.js chakra.js > xlsx.chakra.js
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
|
||||
```cmd
|
||||
type global.js xlsx.full.min.js payload.js chakra.js > xlsx.chakra.js
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
The final script defines `global` before loading the standalone library. Once
|
||||
ready, it will read the bundled test data and print the contents as CSV.
|
||||
|
||||
:::note pass
|
||||
|
||||
On Windows, the command should be run in WSL.
|
||||
|
||||
:::
|
||||
|
||||
5) Run the script using the ChakraCore standalone binary:
|
||||
|
||||
<Tabs groupId="os">
|
||||
@ -699,6 +706,16 @@ The "Integration Example" stores `ch` in the `ChakraCore/out/Test/` folder:
|
||||
.\ch.exe xlsx.chakra.js
|
||||
```
|
||||
|
||||
:::note pass
|
||||
|
||||
The "Integration Example" makes `ChakraCore\Build\VcBuild\bin\x64_debug\ch.exe`:
|
||||
|
||||
```bash
|
||||
ChakraCore\Build\VcBuild\bin\x64_debug\ch.exe xlsx.chakra.js
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
||||
@ -107,7 +107,7 @@ This demo was tested in the following deployments:
|
||||
|:-------------|:---------|:-----------|
|
||||
| `darwin-x64` | `0.20.1` | 2026-01-21 |
|
||||
| `darwin-arm` | `0.21.0` | 2026-03-07 |
|
||||
| `win11-x64` | `0.20.0` | 2025-04-28 |
|
||||
| `win11-x64` | `0.21.1` | 2026-05-08 |
|
||||
| `win11-arm` | `0.21.0` | 2026-03-22 |
|
||||
| `linux-x64` | `0.21.0` | 2026-01-08 |
|
||||
| `linux-arm` | `0.21.0` | 2026-03-07 |
|
||||
|
||||
@ -131,13 +131,11 @@ This demo was tested in the following deployments:
|
||||
|:-------------|:--------|:-----------|
|
||||
| `darwin-x64` | `0.066` | 2026-01-21 |
|
||||
| `darwin-arm` | `0.066` | 2026-03-07 |
|
||||
| `win11-x64` | `0.066` | 2026-01-10 |
|
||||
| `win11-arm` | `0.066` | 2026-01-10 |
|
||||
| `win11-x64` | `0.066` | 2026-05-09 |
|
||||
| `win11-arm` | `0.066` | 2026-05-09 |
|
||||
| `linux-x64` | `0.066` | 2026-03-07 |
|
||||
| `linux-arm` | `0.066` | 2026-03-07 |
|
||||
|
||||
The Windows tests were run in WSL.
|
||||
|
||||
:::
|
||||
|
||||
1) Install `JE` and `File::Slurp` through CPAN:
|
||||
@ -168,12 +166,44 @@ sudo cpan install JE File::Slurp
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.extendscript.js`}
|
||||
</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">{`\
|
||||
curl.exe -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.extendscript.js`}
|
||||
</CodeBlock>
|
||||
|
||||
:::
|
||||
|
||||
3) Download the demo [`SheetJE.pl`](pathname:///perl/SheetJE.pl):
|
||||
|
||||
```bash
|
||||
curl -LO https://docs.sheetjs.com/perl/SheetJE.pl
|
||||
```
|
||||
|
||||
:::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/perl/SheetJE.pl
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
4) Download the [test file](pathname:///cd.xls) and run:
|
||||
|
||||
```bash
|
||||
@ -181,5 +211,22 @@ curl -LO https://docs.sheetjs.com/cd.xls
|
||||
perl SheetJE.pl cd.xls
|
||||
```
|
||||
|
||||
:::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/cd.xls
|
||||
perl SheetJE.pl cd.xls
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
After a short wait, the contents will be displayed in CSV form. The script will
|
||||
also generate the spreadsheet `SheetJE.fods` which can be opened in LibreOffice.
|
||||
@ -5,6 +5,8 @@ pagination_next: solutions/input
|
||||
---
|
||||
|
||||
import current from '/version.js';
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
|
||||
[JerryScript](https://jerryscript.net/) is a lightweight JavaScript engine. It
|
||||
@ -38,13 +40,11 @@ This demo was tested in the following environments:
|
||||
|:-------------|:----------|:-----------|
|
||||
| `darwin-x64` | `b706935` | 2026-01-21 |
|
||||
| `darwin-arm` | `b706935` | 2026-03-07 |
|
||||
| `win11-x64` | `5020015` | 2025-04-23 |
|
||||
| `win11-arm` | `5020015` | 2025-02-23 |
|
||||
| `win11-x64` | `b706935` | 2026-05-08 |
|
||||
| `win11-arm` | `b706935` | 2026-05-09 |
|
||||
| `linux-x64` | `b706935` | 2026-03-07 |
|
||||
| `linux-arm` | `b706935` | 2026-03-07 |
|
||||
|
||||
The Windows tests were run in WSL.
|
||||
|
||||
:::
|
||||
|
||||
## Integration Details
|
||||
@ -339,6 +339,13 @@ This function can be used to pull the `csv` value from the previous section:
|
||||
The "Integration Example" covers a traditional integration in a C application,
|
||||
while the "CLI Test" demonstrates other concepts using the `jerry` CLI tool.
|
||||
|
||||
:::note pass
|
||||
|
||||
The Windows build requires Visual Studio with "Desktop development with C++".
|
||||
**Commands must be run in a "Native Tools Command Prompt" session.**
|
||||
|
||||
:::
|
||||
|
||||
### Integration Example
|
||||
|
||||
<details>
|
||||
@ -346,7 +353,7 @@ while the "CLI Test" demonstrates other concepts using the `jerry` CLI tool.
|
||||
|
||||
The JerryScript build system requires `cmake`.
|
||||
|
||||
Debian and WSL additionally require `python3` and `python-is-python3` packages.
|
||||
Debian and Ubuntu additionally require `python3` and `python-is-python3` .
|
||||
|
||||
</details>
|
||||
|
||||
@ -359,6 +366,9 @@ cd SheetJSJerry
|
||||
|
||||
2) Clone the repository and build the library with required options:
|
||||
|
||||
<Tabs groupId="os">
|
||||
<TabItem value="unix" label="Linux/MacOS">
|
||||
|
||||
```bash
|
||||
git clone --depth=1 https://github.com/jerryscript-project/jerryscript.git
|
||||
cd jerryscript
|
||||
@ -366,16 +376,42 @@ python3 tools/build.py --error-messages=ON --logging=ON --mem-heap=8192 --cpoint
|
||||
cd ..
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
|
||||
```powershell
|
||||
git clone --depth=1 https://github.com/jerryscript-project/jerryscript.git
|
||||
cd jerryscript
|
||||
python tools/build.py --error-messages=ON --logging=ON --mem-heap=8192 --cpointer-32bit=ON
|
||||
cd ..
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
:::caution pass
|
||||
|
||||
In some tests, the build step failed with compiler warnings treated as errors.
|
||||
The flags `-Wno-error` and `-Wno-unterminated-string-initialization` should be
|
||||
added to the build:
|
||||
|
||||
<Tabs groupId="os">
|
||||
<TabItem value="unix" label="Linux/MacOS">
|
||||
|
||||
```bash
|
||||
python3 tools/build.py --error-messages=ON --logging=ON --mem-heap=8192 --cpointer-32bit=ON --compile-flag="-Wno-error" --compile-flag="-Wno-unterminated-string-initialization"
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
|
||||
```powershell
|
||||
python tools/build.py --error-messages=ON --logging=ON --mem-heap=8192 --cpointer-32bit=ON --compile-flag="-Wno-error" --compile-flag="-Wno-unterminated-string-initialization"
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
:::
|
||||
|
||||
3) Download the SheetJS Standalone script, shim script and test file. Move all
|
||||
@ -402,16 +438,42 @@ curl -LO https://docs.sheetjs.com/jerryscript/sheetjs.jerry.c
|
||||
|
||||
5) Build the sample application:
|
||||
|
||||
<Tabs groupId="os">
|
||||
<TabItem value="unix" label="Linux/MacOS">
|
||||
|
||||
```bash
|
||||
gcc -o sheetjs.jerry -Ijerryscript/jerry-ext/include -Ijerryscript/jerry-math/include -Ijerryscript/jerry-core/include sheetjs.jerry.c -ljerry-core -ljerry-ext -ljerry-port -lm -Ljerryscript/build/lib -Wno-pointer-sign
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
|
||||
```powershell
|
||||
cl /Fe:sheetjs.jerry.exe /Ijerryscript/jerry-ext/include /Ijerryscript/jerry-math/include /Ijerryscript/jerry-core/include sheetjs.jerry.c /MD /link /LIBPATH:jerryscript/build/lib /LIBPATH:jerryscript/build/lib/MinSizeRel jerry-core.lib jerry-ext.lib jerry-port.lib
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
6) Run the test program:
|
||||
|
||||
<Tabs groupId="os">
|
||||
<TabItem value="unix" label="Linux/MacOS">
|
||||
|
||||
```bash
|
||||
./sheetjs.jerry pres.xlsx
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
|
||||
```powershell
|
||||
.\sheetjs.jerry.exe pres.xlsx
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
If successful, the program will print contents of the first sheet as CSV rows.
|
||||
|
||||
### CLI Test
|
||||
@ -427,12 +489,27 @@ as a Base64 string and directly add it to an amalgamated script.
|
||||
|
||||
If the "Integration Example" was not tested, run the following commands:
|
||||
|
||||
<Tabs groupId="os">
|
||||
<TabItem value="unix" label="Linux/MacOS">
|
||||
|
||||
```bash
|
||||
git clone --depth=1 https://github.com/jerryscript-project/jerryscript.git
|
||||
cd jerryscript
|
||||
python3 tools/build.py --error-messages=ON --logging=ON --mem-heap=8192 --cpointer-32bit=ON
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
|
||||
```powershell
|
||||
git clone --depth=1 https://github.com/jerryscript-project/jerryscript.git
|
||||
cd jerryscript
|
||||
python tools/build.py --error-messages=ON --logging=ON --mem-heap=8192 --cpointer-32bit=ON
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
If the "Integration Example" was tested, enter the `jerryscript` folder:
|
||||
|
||||
```bash
|
||||
@ -478,19 +555,45 @@ console.log(XLSX.utils.sheet_to_csv(wb.Sheets[wb.SheetNames[0]]));
|
||||
|
||||
4) Create the amalgamation `xlsx.jerry.js`:
|
||||
|
||||
<Tabs groupId="os">
|
||||
<TabItem value="unix" label="Linux/MacOS">
|
||||
|
||||
```bash
|
||||
cat global.js xlsx.full.min.js payload.js jerry.js > xlsx.jerry.js
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
|
||||
```cmd
|
||||
type global.js xlsx.full.min.js payload.js jerry.js > xlsx.jerry.js
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
The final script defines `global` before loading the standalone library. Once
|
||||
ready, it will read the bundled test data and print the contents as CSV.
|
||||
|
||||
5) Run the script using the `jerry` standalone binary:
|
||||
|
||||
<Tabs groupId="os">
|
||||
<TabItem value="unix" label="Linux/MacOS">
|
||||
|
||||
```bash
|
||||
build/bin/jerry xlsx.jerry.js; echo $?
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
|
||||
```cmd
|
||||
build\bin\MinSizeRel\jerry.exe xlsx.jerry.js
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
If successful, the contents of the test file will be displayed in CSV rows. The
|
||||
status code `0` will be printed after the rows.
|
||||
|
||||
|
||||
@ -54,14 +54,16 @@ This demo was tested in the following deployments:
|
||||
|
||||
| OpenJDK | GraalJS | Date |
|
||||
|:--------|:--------|:-----------|
|
||||
| 24.0.1 | 24.2.1 | 2025-05-06 |
|
||||
| 23.0.2 | 24.2.1 | 2025-05-06 |
|
||||
| 22.0.2 | 24.2.1 | 2025-05-06 |
|
||||
| 21.0.7 | 24.2.1 | 2025-05-06 |
|
||||
| 20.0.2 | 24.2.1 | 2025-05-06 |
|
||||
| 19.0.2 | 24.2.1 | 2025-05-06 |
|
||||
| 18.0.2 | 24.2.1 | 2025-05-06 |
|
||||
| 17.0.15 | 24.2.1 | 2025-05-06 |
|
||||
| 26 | 25.0.2 | 2026-05-07 |
|
||||
| 25.0.2 | 25.0.2 | 2026-05-07 |
|
||||
| 24.0.2 | 25.0.2 | 2026-05-07 |
|
||||
| 23.0.2 | 25.0.2 | 2026-05-07 |
|
||||
| 22.0.2 | 25.0.2 | 2026-05-07 |
|
||||
| 21.0.10 | 25.0.2 | 2026-05-07 |
|
||||
| 20.0.2 | 25.0.2 | 2026-05-07 |
|
||||
| 19.0.2 | 25.0.2 | 2026-05-07 |
|
||||
| 18.0.2 | 25.0.2 | 2026-05-07 |
|
||||
| 17.0.18 | 25.0.2 | 2026-05-07 |
|
||||
|
||||
:::
|
||||
|
||||
@ -70,14 +72,14 @@ This demo was tested in the following deployments:
|
||||
0) Download GraalJS and its dependencies:
|
||||
|
||||
```bash
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/js/js-scriptengine/24.2.1/js-scriptengine-24.2.1.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/js/js-language/24.2.1/js-language-24.2.1.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/polyglot/polyglot/24.2.1/polyglot-24.2.1.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/collections/24.2.1/collections-24.2.1.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/24.2.1/truffle-api-24.2.1.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/nativeimage/24.2.1/nativeimage-24.2.1.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/shadowed/icu4j/24.2.1/icu4j-24.2.1.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/regex/regex/24.2.1/regex-24.2.1.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/js/js-scriptengine/25.0.2/js-scriptengine-25.0.2.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/js/js-language/25.0.2/js-language-25.0.2.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/polyglot/polyglot/25.0.2/polyglot-25.0.2.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/collections/25.0.2/collections-25.0.2.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/25.0.2/truffle-api-25.0.2.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/nativeimage/25.0.2/nativeimage-25.0.2.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/shadowed/icu4j/25.0.2/icu4j-25.0.2.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/regex/regex/25.0.2/regex-25.0.2.jar"
|
||||
```
|
||||
|
||||
1) Download the SheetJS Standalone script, shim script and test file. Move all
|
||||
@ -118,14 +120,14 @@ CSV rows from the first worksheet.
|
||||
<TabItem value="unix" label="Linux/MacOS">
|
||||
|
||||
```bash
|
||||
java -cp ".:js-scriptengine-24.2.1.jar:js-language-24.2.1.jar:polyglot-24.2.1.jar:collections-24.2.1.jar:truffle-api-24.2.1.jar:nativeimage-24.2.1.jar:icu4j-24.2.1.jar:regex-24.2.1.jar" -Dpolyglot.js.nashorn-compat=true SheetJSNashorn pres.xlsx
|
||||
java -cp ".:js-scriptengine-25.0.2.jar:js-language-25.0.2.jar:polyglot-25.0.2.jar:collections-25.0.2.jar:truffle-api-25.0.2.jar:nativeimage-25.0.2.jar:icu4j-25.0.2.jar:regex-25.0.2.jar" -Dpolyglot.js.nashorn-compat=true SheetJSNashorn pres.xlsx
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
|
||||
```bash
|
||||
java -cp ".;js-scriptengine-24.2.1.jar;js-language-24.2.1.jar;polyglot-24.2.1.jar;collections-24.2.1.jar;truffle-api-24.2.1.jar;nativeimage-24.2.1.jar;icu4j-24.2.1.jar;regex-24.2.1.jar" -D"polyglot.js.nashorn-compat=true" SheetJSNashorn pres.xlsx
|
||||
java -cp ".;js-scriptengine-25.0.2.jar;js-language-25.0.2.jar;polyglot-25.0.2.jar;collections-25.0.2.jar;truffle-api-25.0.2.jar;nativeimage-25.0.2.jar;icu4j-25.0.2.jar;regex-25.0.2.jar" -D"polyglot.js.nashorn-compat=true" SheetJSNashorn pres.xlsx
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@ -155,14 +157,14 @@ cd sheethorn
|
||||
<TabItem value="unix" label="Linux/MacOS">
|
||||
|
||||
```bash
|
||||
java -cp ".:js-scriptengine-24.2.1.jar:js-language-24.2.1.jar:polyglot-24.2.1.jar:collections-24.2.1.jar:truffle-api-24.2.1.jar:nativeimage-24.2.1.jar:icu4j-24.2.1.jar:regex-24.2.1.jar:SheetJSNashorn.jar" -Dpolyglot.js.nashorn-compat=true SheetJSNashorn pres.xlsx
|
||||
java -cp ".:js-scriptengine-25.0.2.jar:js-language-25.0.2.jar:polyglot-25.0.2.jar:collections-25.0.2.jar:truffle-api-25.0.2.jar:nativeimage-25.0.2.jar:icu4j-25.0.2.jar:regex-25.0.2.jar:SheetJSNashorn.jar" -Dpolyglot.js.nashorn-compat=true SheetJSNashorn pres.xlsx
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
|
||||
```bash
|
||||
java -cp ".;js-scriptengine-24.2.1.jar;js-language-24.2.1.jar;polyglot-24.2.1.jar;collections-24.2.1.jar;truffle-api-24.2.1.jar;nativeimage-24.2.1.jar;icu4j-24.2.1.jar;regex-24.2.1.jar;SheetJSNashorn.jar" -D"polyglot.js.nashorn-compat=true" SheetJSNashorn pres.xlsx
|
||||
java -cp ".;js-scriptengine-25.0.2.jar;js-language-25.0.2.jar;polyglot-25.0.2.jar;collections-25.0.2.jar;truffle-api-25.0.2.jar;nativeimage-25.0.2.jar;icu4j-25.0.2.jar;regex-25.0.2.jar;SheetJSNashorn.jar" -D"polyglot.js.nashorn-compat=true" SheetJSNashorn pres.xlsx
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
|
||||
@ -178,7 +178,7 @@ This demo was tested in the following deployments:
|
||||
|:-------------|:---------|:-----------|
|
||||
| `darwin-x64` | `3.2.9` | 2026-01-21 |
|
||||
| `darwin-arm` | `3.2.9` | 2026-03-07 |
|
||||
| `win11-x64` | `3.2.9` | 2025-04-23 |
|
||||
| `win11-x64` | `3.2.9` | 2026-05-07 |
|
||||
| `win11-arm` | `3.2.9` | 2026-03-22 |
|
||||
| `linux-x64` | `3.2.9` | 2026-03-07 |
|
||||
| `linux-arm` | `3.2.9` | 2026-03-07 |
|
||||
@ -265,7 +265,7 @@ dotnet add package Jurassic --version 3.2.9
|
||||
|
||||
To verify Jurassic is installed, replace `Program.cs` with the following:
|
||||
|
||||
```csharp title="Program.cs"
|
||||
```csharp title="Program.cs (replace contents)"
|
||||
var engine = new Jurassic.ScriptEngine();
|
||||
Console.WriteLine("Hello {0}", engine.Evaluate("'Sheet' + 'JS'"));
|
||||
```
|
||||
@ -316,7 +316,7 @@ curl.exe -LO https://docs.sheetjs.com/pres.xlsx`}
|
||||
|
||||
6) Replace `Program.cs` with the following:
|
||||
|
||||
```csharp title="Program.cs"
|
||||
```csharp title="Program.cs (replace contents)"
|
||||
var engine = new Jurassic.ScriptEngine();
|
||||
engine.Evaluate("var global = (function(){ return this; }).call(null);");
|
||||
engine.Evaluate(File.ReadAllText("shim.min.js"));
|
||||
@ -336,7 +336,7 @@ dotnet run
|
||||
|
||||
7) Replace `Program.cs` with the following:
|
||||
|
||||
```csharp title="Program.cs"
|
||||
```csharp title="Program.cs (replace contents)"
|
||||
var engine = new Jurassic.ScriptEngine();
|
||||
|
||||
/* Initialize Jurassic */
|
||||
|
||||
@ -96,13 +96,13 @@ The following bindings have been tested:
|
||||
|
||||
:::note pass
|
||||
|
||||
Crosses (✘) mark tests for Windows on ARM that use the X64 compatibility layer.
|
||||
Proper Windows x64 binaries were cross-compiled and run in Windows on ARM.
|
||||
|
||||
Asterisks (✱) in the Windows columns mark tests that were run in Windows
|
||||
Subsystem for Linux (WSL). In some cases, community efforts have produced forks
|
||||
with native Windows support.
|
||||
|
||||
Crosses (✘) mark tests for Windows on ARM that use the X64 compatibility layer.
|
||||
Proper Windows x64 binaries were cross-compiled and run in Windows on ARM.
|
||||
|
||||
Blank cells mark untested or unsupported configurations. With cross-compilation,
|
||||
V8 can run natively in Windows on ARM. The `win11-arm` platform is not tested
|
||||
since the official build infrastructure does not support Windows on ARM and the
|
||||
|
||||
@ -45,7 +45,7 @@ These instructions were tested on the following platforms:
|
||||
| Linux (Debian Linux AArch64) | `linux-arm` | 2026-03-05 |
|
||||
| MacOS 15.6 (x64) | `darwin-x64` | 2026-01-21 |
|
||||
| MacOS 15.7 (ARM64) | `darwin-arm` | 2026-02-02 |
|
||||
| Windows 11 (x64) + WSL Ubuntu | `win11-x64` | 2025-06-20 |
|
||||
| Windows 11 (x64) + WSL Ubuntu | `win11-x64` | 2026-05-07 |
|
||||
| Windows 11 (ARM) + WSL Ubuntu | `win11-arm` | 2026-03-08 |
|
||||
|
||||
With some additional dependencies, the unminified scripts are reproducible and
|
||||
@ -83,19 +83,30 @@ to install every listed feature that is available for the Windows version.
|
||||
|
||||
:::
|
||||
|
||||
The following PowerShell command updates WSL:
|
||||
After installing WSL, the following PowerShell command will update WSL:
|
||||
|
||||
```powershell
|
||||
wsl --update
|
||||
```
|
||||
|
||||
The following PowerShell command installs Ubuntu within WSL:
|
||||
WSL does not automatically install a Linux distribution. The following command
|
||||
installs Ubuntu:
|
||||
|
||||
```powershell
|
||||
wsl --install Ubuntu
|
||||
```
|
||||
|
||||
:::note pass
|
||||
The installation process will create a default Unix user account. The password
|
||||
need not match the Windows user password.
|
||||
|
||||
:::danger Telemetry
|
||||
|
||||
In some test runs, Ubuntu requested "platform metrics collection". If prompted
|
||||
to opt-in, type `n` and press <kbd>Enter</kbd>
|
||||
|
||||
:::
|
||||
|
||||
:::caution Troubleshooting
|
||||
|
||||
In some versions of `wsl`, the `-d` flag must be specified:
|
||||
|
||||
@ -103,9 +114,7 @@ In some versions of `wsl`, the `-d` flag must be specified:
|
||||
wsl --install -d Ubuntu
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
:::info pass
|
||||
---
|
||||
|
||||
In some tests, the install failed with a `WSL_E_DEFAULT_DISTRO_NOT_FOUND` error.
|
||||
|
||||
@ -118,9 +127,7 @@ wsl --set-default-version 2
|
||||
wsl --install Ubuntu
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
:::caution pass
|
||||
---
|
||||
|
||||
In Windows 11 24H2, the `wsl` commands may fail with the following message:
|
||||
|
||||
@ -159,7 +166,7 @@ sudo apt-get install curl
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
|
||||
```
|
||||
|
||||
C) Exit the WSL session and start a new session
|
||||
C) Exit the WSL session and start a new session by running `bash`.
|
||||
|
||||
D) Install NodeJS 16 using NVM:
|
||||
|
||||
@ -468,6 +475,14 @@ sudo apt-get install -y make
|
||||
|
||||
### Build from source tree
|
||||
|
||||
:::info pass
|
||||
|
||||
In Windows, commands should be run within a WSL `bash` session.
|
||||
|
||||
In MacOS and Linux, commands should run in a standard shell session.
|
||||
|
||||
:::
|
||||
|
||||
0) Clone the project:
|
||||
|
||||
```bash
|
||||
|
||||
@ -1,18 +1,20 @@
|
||||
#!/bin/bash
|
||||
# https://docs.sheetjs.com/docs/demos/engines/graaljs
|
||||
GRAAL_VERSION="25.0.2"
|
||||
|
||||
cd /tmp
|
||||
rm -rf sheetjs-graaljs
|
||||
mkdir -p sheetjs-graaljs
|
||||
cd sheetjs-graaljs
|
||||
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/js/js-scriptengine/24.2.1/js-scriptengine-24.2.1.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/js/js-language/24.2.1/js-language-24.2.1.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/polyglot/polyglot/24.2.1/polyglot-24.2.1.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/collections/24.2.1/collections-24.2.1.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/24.2.1/truffle-api-24.2.1.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/nativeimage/24.2.1/nativeimage-24.2.1.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/shadowed/icu4j/24.2.1/icu4j-24.2.1.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/regex/regex/24.2.1/regex-24.2.1.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/js/js-scriptengine/${GRAAL_VERSION}/js-scriptengine-${GRAAL_VERSION}.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/js/js-language/${GRAAL_VERSION}/js-language-${GRAAL_VERSION}.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/polyglot/polyglot/${GRAAL_VERSION}/polyglot-${GRAAL_VERSION}.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/collections/${GRAAL_VERSION}/collections-${GRAAL_VERSION}.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/${GRAAL_VERSION}/truffle-api-${GRAAL_VERSION}.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/nativeimage/${GRAAL_VERSION}/nativeimage-${GRAAL_VERSION}.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/shadowed/icu4j/${GRAAL_VERSION}/icu4j-${GRAAL_VERSION}.jar"
|
||||
curl -LO "https://repo1.maven.org/maven2/org/graalvm/regex/regex/${GRAAL_VERSION}/regex-${GRAAL_VERSION}.jar"
|
||||
|
||||
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
|
||||
@ -20,19 +22,19 @@ curl -LO https://sheetjs.com/pres.xlsx
|
||||
|
||||
curl -LO https://docs.sheetjs.com/nashorn/SheetJSNashorn.java
|
||||
|
||||
for n in {17..24}; do
|
||||
for n in {17..26}; do
|
||||
export JAVA_HOME=`/usr/libexec/java_home -v $n`
|
||||
java -version
|
||||
rm -fr SheetJSNashorn.class SheetJSNashorn.jar sheethorn
|
||||
javac SheetJSNashorn.java
|
||||
|
||||
java -cp ".:js-scriptengine-24.2.1.jar:js-language-24.2.1.jar:polyglot-24.2.1.jar:collections-24.2.1.jar:truffle-api-24.2.1.jar:nativeimage-24.2.1.jar:icu4j-24.2.1.jar:regex-24.2.1.jar" -Dpolyglot.js.nashorn-compat=true SheetJSNashorn pres.xlsx
|
||||
java -cp ".:js-scriptengine-${GRAAL_VERSION}.jar:js-language-${GRAAL_VERSION}.jar:polyglot-${GRAAL_VERSION}.jar:collections-${GRAAL_VERSION}.jar:truffle-api-${GRAAL_VERSION}.jar:nativeimage-${GRAAL_VERSION}.jar:icu4j-${GRAAL_VERSION}.jar:regex-${GRAAL_VERSION}.jar" -Dpolyglot.js.nashorn-compat=true SheetJSNashorn pres.xlsx
|
||||
|
||||
jar -cf SheetJSNashorn.jar SheetJSNashorn.class xlsx.full.min.js shim.min.js
|
||||
|
||||
mkdir -p sheethorn
|
||||
cp *.jar pres.xlsx sheethorn
|
||||
cd sheethorn
|
||||
java -cp ".:js-scriptengine-24.2.1.jar:js-language-24.2.1.jar:polyglot-24.2.1.jar:collections-24.2.1.jar:truffle-api-24.2.1.jar:nativeimage-24.2.1.jar:icu4j-24.2.1.jar:regex-24.2.1.jar:SheetJSNashorn.jar" -Dpolyglot.js.nashorn-compat=true SheetJSNashorn pres.xlsx
|
||||
java -cp ".:js-scriptengine-${GRAAL_VERSION}.jar:js-language-${GRAAL_VERSION}.jar:polyglot-${GRAAL_VERSION}.jar:collections-${GRAAL_VERSION}.jar:truffle-api-${GRAAL_VERSION}.jar:nativeimage-${GRAAL_VERSION}.jar:icu4j-${GRAAL_VERSION}.jar:regex-${GRAAL_VERSION}.jar:SheetJSNashorn.jar" -Dpolyglot.js.nashorn-compat=true SheetJSNashorn pres.xlsx
|
||||
cd -
|
||||
done
|
||||
|
||||
Loading…
Reference in New Issue
Block a user