forked from sheetjs/docs.sheetjs.com
arm
This commit is contained in:
parent
4770277d0b
commit
c76ec7f27d
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Data Grids and Tables",
|
||||
"position": 2
|
||||
"position": 4
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Servers and Remote Data",
|
||||
"position": 3
|
||||
"position": 9
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Content and Static Sites",
|
||||
"position": 4
|
||||
"position": 12
|
||||
}
|
@ -213,20 +213,20 @@ const wb = XLSX.read(ab);
|
||||
|
||||
### Fetch Demo
|
||||
|
||||
:::note
|
||||
:::note Tested Deployments
|
||||
|
||||
The Android demo was last tested on 2023 September 03 with RN `0.72.4`. The
|
||||
The Android demo was last tested on 2023 December 01 with RN `0.72.7`. The
|
||||
simulator used Android 13 ("Tiramisu") API 33 on a Pixel 3.
|
||||
|
||||
The iOS demo was last tested on 2023 September 03 with RN `0.72.4`. The
|
||||
simulator used iOS 16.4 on an iPhone SE (3rd generation).
|
||||
The iOS demo was last tested on 2023 December 01 with RN `0.72.7`. The
|
||||
simulator used iOS 17.0.1 on an iPhone SE (3rd generation).
|
||||
|
||||
:::
|
||||
|
||||
1) Create project:
|
||||
|
||||
```bash
|
||||
npx -y react-native@0.72.4 init SheetJSRNFetch --version="0.72.4"
|
||||
npx -y react-native@0.72.7 init SheetJSRNFetch --version="0.72.7"
|
||||
```
|
||||
|
||||
2) Install shared dependencies:
|
||||
@ -253,9 +253,9 @@ curl -LO https://docs.sheetjs.com/reactnative/App.tsx
|
||||
When the demo was last tested on macOS, `java -version` displayed the following:
|
||||
|
||||
```
|
||||
openjdk version "11.0.20" 2023-07-18 LTS
|
||||
OpenJDK Runtime Environment Zulu11.66+15-CA (build 11.0.20+8-LTS)
|
||||
OpenJDK 64-Bit Server VM Zulu11.66+15-CA (build 11.0.20+8-LTS, mixed mode)
|
||||
openjdk version "11.0.21" 2023-10-17 LTS
|
||||
OpenJDK Runtime Environment Zulu11.68+17-CA (build 11.0.21+9-LTS)
|
||||
OpenJDK 64-Bit Server VM Zulu11.68+17-CA (build 11.0.21+9-LTS, mixed mode)
|
||||
```
|
||||
|
||||
:::
|
||||
@ -591,7 +591,7 @@ await FileSystem.writeAsStringAsync(FileSystem.documentDirectory + "sheetjs.xlsx
|
||||
|
||||
### Demo
|
||||
|
||||
:::note
|
||||
:::note Tested Deployments
|
||||
|
||||
Each Android demo was last tested on 2023 September 03 with RN `0.72.6`. The
|
||||
simulator used Android 13 ("Tiramisu") API 33 on a Pixel 3.
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "iOS and Android Apps",
|
||||
"position": 5
|
||||
"position": 17
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Databases and Stores",
|
||||
"position": 7
|
||||
"position": 23
|
||||
}
|
@ -16,12 +16,12 @@ from the main or the renderer thread.
|
||||
The "Complete Example" creates an app that looks like the screenshots below:
|
||||
|
||||
<table><thead><tr>
|
||||
<th><a href="#complete-example">Win10</a></th>
|
||||
<th><a href="#complete-example">Windows</a></th>
|
||||
<th><a href="#complete-example">macOS</a></th>
|
||||
<th><a href="#complete-example">Linux</a></th>
|
||||
</tr></thead><tbody><tr><td>
|
||||
|
||||
![Win10 screenshot](pathname:///electron/ew.png)
|
||||
![Windows screenshot](pathname:///electron/ew.png)
|
||||
|
||||
</td><td>
|
||||
|
||||
@ -178,18 +178,18 @@ function exportFile(workbook) {
|
||||
|
||||
## Complete Example
|
||||
|
||||
:::note
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was tested in the following environments:
|
||||
|
||||
| OS and Version | Arch | Electron | Date |
|
||||
|:---------------|:-----|:---------|:-----------|
|
||||
| macOS 13.5.1 | x64 | `26.1.0` | 2023-09-03 |
|
||||
| macOS 13.5.1 | ARM | `26.1.0` | 2023-09-03 |
|
||||
| Windows 10 | x64 | `26.1.0` | 2023-09-03 |
|
||||
| Windows 11 | ARM | `26.1.0` | 2023-09-24 |
|
||||
| Linux (HoloOS) | x64 | `27.0.0` | 2023-10-11 |
|
||||
| Linux (Debian) | ARM | `26.1.0` | 2023-09-03 |
|
||||
| OS and Version | Architecture | Electron | Date |
|
||||
|:---------------|:-------------|:---------|:-----------|
|
||||
| macOS 13.5.1 | `darwin-x64` | `26.1.0` | 2023-09-03 |
|
||||
| macOS 14.1.2 | `darwin-arm` | `27.1.3` | 2023-12-01 |
|
||||
| Windows 10 | `win10-x64` | `26.1.0` | 2023-09-03 |
|
||||
| Windows 11 | `win11-arm` | `27.1.3` | 2023-12-01 |
|
||||
| Linux (HoloOS) | `linux-x64` | `27.0.0` | 2023-10-11 |
|
||||
| Linux (Debian) | `linux-arm` | `27.1.3` | 2023-12-01 |
|
||||
|
||||
:::
|
||||
|
||||
@ -216,7 +216,7 @@ try to load the page in your browser. The goal is to save the file contents.
|
||||
|
||||
:::
|
||||
|
||||
These instructions can be run in a terminal window:
|
||||
These instructions can be run in a Terminal (bash) or Command Prompt window:
|
||||
|
||||
```bash
|
||||
mkdir sheetjs-electron
|
||||
@ -262,7 +262,7 @@ The program will run on ARM64 Windows.
|
||||
|
||||
:::
|
||||
|
||||
**Testing**
|
||||
### Testing
|
||||
|
||||
5) Download [the test file `pres.numbers`](https://sheetjs.com/pres.numbers)
|
||||
|
||||
@ -272,7 +272,7 @@ The program will run on ARM64 Windows.
|
||||
npx -y electron .
|
||||
```
|
||||
|
||||
_Electron API_
|
||||
#### Electron API
|
||||
|
||||
7) Click "Click here to select a file from your computer". With the file picker,
|
||||
navigate to the Downloads folder and select `pres.numbers`.
|
||||
@ -282,10 +282,18 @@ The application should show data in a table.
|
||||
8) Click "Export Data!" and click "Save" in the popup. By default, it will try
|
||||
to write to `Untitled.xls` in the Downloads folder.
|
||||
|
||||
:::note pass
|
||||
|
||||
During the most recent Linux ARM64 test, the dialog did not have a default name.
|
||||
|
||||
If there is no default name, enter `Untitled.xls` and click "Save".
|
||||
|
||||
:::
|
||||
|
||||
The app will show a popup once the data is exported. Open the file in a
|
||||
spreadsheet editor and compare the data to the table shown in the application.
|
||||
|
||||
_Drag and Drop_
|
||||
#### Drag and Drop
|
||||
|
||||
9) Close the application, end the terminal process and re-launch (see step 6)
|
||||
|
||||
@ -294,7 +302,7 @@ _Drag and Drop_
|
||||
11) Click and drag the `pres.numbers` file from the Downloads folder to the
|
||||
bordered "Drop a spreadsheet file" box. The file data should be displayed.
|
||||
|
||||
_File Input Element_
|
||||
#### File Input Element
|
||||
|
||||
12) Close the application, end the terminal process and re-launch (see step 6)
|
||||
|
||||
@ -305,7 +313,7 @@ and select `pres.numbers`.
|
||||
## Electron Breaking Changes
|
||||
|
||||
The first version of this demo used Electron 1.7.5. The current demo includes
|
||||
the required changes for Electron 23.0.0.
|
||||
the required changes for Electron 27.1.3.
|
||||
|
||||
There are no Electron-specific workarounds in the library, but Electron broke
|
||||
backwards compatibility multiple times. A summary of changes is noted below.
|
||||
@ -327,4 +335,4 @@ call is required to enable Developer Tools in the window.
|
||||
|
||||
:::
|
||||
|
||||
[^1]: See ["Makers"](https://www.electronforge.io/config/makers) in the Electron Forge documentation.
|
||||
[^1]: See ["Makers"](https://www.electronforge.io/config/makers) in the Electron Forge documentation. On Linux, the demo generates `rpm` and `deb` distributables.
|
@ -18,12 +18,12 @@ can be referenced in a `SCRIPT` tag from the entry point HTML page.
|
||||
The "Complete Example" creates an app that looks like the screenshots below:
|
||||
|
||||
<table><thead><tr>
|
||||
<th><a href="#complete-example">Win10</a></th>
|
||||
<th><a href="#complete-example">Windows</a></th>
|
||||
<th><a href="#complete-example">macOS</a></th>
|
||||
<th><a href="#complete-example">Linux</a></th>
|
||||
</tr></thead><tbody><tr><td>
|
||||
|
||||
![Win10 screenshot](pathname:///nwjs/nww.png)
|
||||
![Windows screenshot](pathname:///nwjs/nww.png)
|
||||
|
||||
</td><td>
|
||||
|
||||
@ -107,23 +107,30 @@ input.click();
|
||||
|
||||
## Complete Example
|
||||
|
||||
:::note
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was tested in the following environments:
|
||||
|
||||
| OS and Version | Arch | NW.js | Date |
|
||||
|:---------------|:-----|:---------|:-----------|
|
||||
| macOS 13.5.2 | x64 | `0.78.1` | 2023-09-27 |
|
||||
| macOS 13.5.2 | ARM | `0.78.1` | 2023-09-27 |
|
||||
| Windows 10 | x64 | `0.78.1` | 2023-09-27 |
|
||||
| Windows 11 | ARM | `0.78.1` | 2023-09-27 |
|
||||
| Linux (HoloOS) | x64 | `0.78.1` | 2023-10-11 |
|
||||
| OS and Version | Architecture | NW.js | Date |
|
||||
|:---------------|:-------------|:---------|:-----------|
|
||||
| macOS 13.5.2 | `darwin-x64` | `0.78.1` | 2023-09-27 |
|
||||
| macOS 14.1.2 | `darwin-arm` | `0.82.0` | 2023-12-01 |
|
||||
| Windows 10 | `win10-x64` | `0.78.1` | 2023-09-27 |
|
||||
| Windows 11 | `win11-arm` | `0.82.0` | 2023-12-01 |
|
||||
| Linux (HoloOS) | `linux-x64` | `0.78.1` | 2023-10-11 |
|
||||
|
||||
There is no official Linux ARM64 release. The community release[^1] was tested
|
||||
and verified on 2023-09-27.
|
||||
|
||||
:::
|
||||
|
||||
0) Create a project folder:
|
||||
|
||||
```bash
|
||||
mkdir sheetjs-nwjs
|
||||
cd sheetjs-nwjs
|
||||
```
|
||||
|
||||
1) Create a `package.json` file that specifies the entry point:
|
||||
|
||||
<CodeBlock language="json" title="package.json">{`\
|
||||
@ -133,7 +140,7 @@ and verified on 2023-09-27.
|
||||
"version": "0.0.0",
|
||||
"main": "index.html",
|
||||
"dependencies": {
|
||||
"nw": "0.78.1",
|
||||
"nw": "0.82.0",
|
||||
"xlsx": "https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz"
|
||||
}
|
||||
}`}
|
||||
@ -172,7 +179,7 @@ the file input element to select a spreadsheet and clicking the export button.
|
||||
5) To build a standalone app, run the builder:
|
||||
|
||||
```bash
|
||||
npx -p nw-builder nwbuild --mode=build --version=0.78.1 --glob=false --outDir=../out ./
|
||||
npx -p nw-builder nwbuild --mode=build --version=0.82.0 --glob=false --outDir=../out ./
|
||||
```
|
||||
|
||||
This will generate the standalone app in the `..\out\` folder.
|
@ -33,7 +33,7 @@ app to read and write workbooks. The app will look like the screenshots below:
|
||||
<th><a href="#complete-example">Linux</a></th>
|
||||
</tr></thead><tbody><tr><td>
|
||||
|
||||
![Win10 screenshot](pathname:///wails/win10.png)
|
||||
![Windows screenshot](pathname:///wails/win10.png)
|
||||
|
||||
</td><td>
|
||||
|
||||
@ -295,14 +295,14 @@ async function exportFile(table_element) {
|
||||
|
||||
This demo was tested in the following environments:
|
||||
|
||||
| OS and Version | Arch | Wails | Date |
|
||||
|:---------------|:-----|:---------|:-----------|
|
||||
| macOS 13.6 | x64 | `v2.6.0` | 2023-11-05 |
|
||||
| macOS 13.5.1 | ARM | `v2.5.1` | 2023-08-24 |
|
||||
| Windows 10 | x64 | `v2.5.1` | 2023-08-25 |
|
||||
| Windows 11 | ARM | `v2.6.0` | 2023-09-25 |
|
||||
| Linux (HoloOS) | x64 | `v2.6.0` | 2023-10-11 |
|
||||
| Linux (Debian) | ARM | `v2.6.0` | 2023-09-25 |
|
||||
| OS and Version | Architecture | Wails | Date |
|
||||
|:---------------|:-------------|:---------|:-----------|
|
||||
| macOS 13.6 | `darwin-x64` | `v2.6.0` | 2023-11-05 |
|
||||
| macOS 14.1.2 | `darwin-arm` | `v2.6.0` | 2023-12-01 |
|
||||
| Windows 10 | `win10-x64` | `v2.5.1` | 2023-08-25 |
|
||||
| Windows 11 | `win11-arm` | `v2.6.0` | 2023-12-01 |
|
||||
| Linux (HoloOS) | `linux-x64` | `v2.6.0` | 2023-10-11 |
|
||||
| Linux (Debian) | `linux-arm` | `v2.6.0` | 2023-12-01 |
|
||||
|
||||
:::
|
||||
|
@ -30,12 +30,12 @@ The ["Complete Example"](#complete-example) section covers a complete desktop
|
||||
app to read and write workbooks. The app will look like the screenshots below:
|
||||
|
||||
<table><thead><tr>
|
||||
<th><a href="#complete-example">Win10</a></th>
|
||||
<th><a href="#complete-example">Windows</a></th>
|
||||
<th><a href="#complete-example">macOS</a></th>
|
||||
<th><a href="#complete-example">Linux</a></th>
|
||||
</tr></thead><tbody><tr><td>
|
||||
|
||||
![Win10 screenshot](pathname:///tauri/win10.png)
|
||||
![Windows screenshot](pathname:///tauri/win10.png)
|
||||
|
||||
</td><td>
|
||||
|
||||
@ -251,18 +251,18 @@ const save_button_callback = async() => {
|
||||
|
||||
## Complete Example
|
||||
|
||||
:::note pass
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was tested in the following environments:
|
||||
|
||||
| OS and Version | Arch | Tauri | Date |
|
||||
|:---------------|:-----|:---------|:-----------|
|
||||
| macOS 14.1.1 | x64 | `v1.5.6` | 2023-11-17 |
|
||||
| macOS 14.0 | ARM | `v1.5.2` | 2023-10-18 |
|
||||
| Windows 10 | x64 | `v1.5.0` | 2023-10-01 |
|
||||
| Windows 11 | ARM | `v1.4.1` | 2023-09-26 |
|
||||
| Linux (HoloOS) | x64 | `v1.5.2` | 2023-10-11 |
|
||||
| Linux (Debian) | ARM | `v1.4.1` | 2023-09-26 |
|
||||
| OS and Version | Architecture | Tauri | Date |
|
||||
|:---------------|:-------------|:---------|:-----------|
|
||||
| macOS 14.1.1 | `darwin-x64` | `v1.5.6` | 2023-11-17 |
|
||||
| macOS 14.0 | `darwin-arm` | `v1.5.2` | 2023-10-18 |
|
||||
| Windows 10 | `win10-x64` | `v1.5.0` | 2023-10-01 |
|
||||
| Windows 11 | `win11-arm` | `v1.5.7` | 2023-12-01 |
|
||||
| Linux (HoloOS) | `linux-x64` | `v1.5.2` | 2023-10-11 |
|
||||
| Linux (Debian) | `linux-arm` | `v1.5.7` | 2023-12-01 |
|
||||
|
||||
:::
|
||||
|
||||
@ -415,7 +415,20 @@ The following features should be manually verified:
|
||||
|
||||
:::note pass
|
||||
|
||||
During the last Linux test, the build failed with the following error message:
|
||||
During the last Linux ARM64 test, the build failed to create an AppImage:
|
||||
|
||||
```
|
||||
Error [tauri-cli-node] failed to bundle project: error running appimage.sh
|
||||
```
|
||||
|
||||
This is a known Tauri AppImage packaging bug. Since the actual application and
|
||||
the `.deb` distributable are created, the error can be ignored.
|
||||
|
||||
:::
|
||||
|
||||
:::note pass
|
||||
|
||||
During the last Linux x64 test, the build failed with the error message:
|
||||
|
||||
```
|
||||
'openssl/opensslv.h' file not found
|
@ -28,12 +28,12 @@ The ["Complete Example"](#complete-example) section covers a complete desktop
|
||||
app to read and write workbooks. The app will look like the screenshots below:
|
||||
|
||||
<table><thead><tr>
|
||||
<th><a href="#complete-example">Win10</a></th>
|
||||
<th><a href="#complete-example">Windows</a></th>
|
||||
<th><a href="#complete-example">macOS</a></th>
|
||||
<th><a href="#complete-example">Linux</a></th>
|
||||
</tr></thead><tbody><tr><td>
|
||||
|
||||
![Win10 screenshot](pathname:///neu/win10.png)
|
||||
![Windows screenshot](pathname:///neu/win10.png)
|
||||
|
||||
</td><td>
|
||||
|
||||
@ -186,18 +186,18 @@ const save_button_callback = async() => {
|
||||
|
||||
## Complete Example
|
||||
|
||||
:::note
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was tested in the following environments:
|
||||
|
||||
| OS and Version | Arch | Server | Client | Date |
|
||||
|:---------------|:-----|:----------|:----------|:-----------|
|
||||
| macOS 13.5.1 | x64 | `v4.13.0` | `v3.11.0` | 2023-08-26 |
|
||||
| macOS 14.0 | ARM | `v4.14.1` | `v3.12.0` | 2023-10-18 |
|
||||
| Windows 10 | x64 | `v4.13.0` | `v3.11.0` | 2023-08-26 |
|
||||
| Windows 11 | ARM | `v4.13.0` | `v3.11.0` | 2023-09-21 |
|
||||
| Linux (HoloOS) | x64 | `v4.14.1` | `v3.12.0` | 2023-10-11 |
|
||||
| Linux (Debian) | ARM | `v4.13.0` | `v3.11.0` | 2023-09-25 |
|
||||
| OS and Version | Architecture | Server | Client | Date |
|
||||
|:---------------|:-------------|:----------|:----------|:-----------|
|
||||
| macOS 13.5.1 | `darwin-x64` | `v4.13.0` | `v3.11.0` | 2023-08-26 |
|
||||
| macOS 14.0 | `darwin-arm` | `v4.14.1` | `v3.12.0` | 2023-10-18 |
|
||||
| Windows 10 | `win10-x64` | `v4.13.0` | `v3.11.0` | 2023-08-26 |
|
||||
| Windows 11 | `win11-arm` | `v4.14.1` | `v3.12.0` | 2023-12-01 |
|
||||
| Linux (HoloOS) | `linux-x64` | `v4.14.1` | `v3.12.0` | 2023-10-11 |
|
||||
| Linux (Debian) | `linux-arm` | `v4.14.1` | `v3.12.0` | 2023-12-01 |
|
||||
|
||||
:::
|
||||
|
||||
@ -368,6 +368,13 @@ async function exportData() {
|
||||
When the app loads, click the "Import File" button and select a spreadsheet to
|
||||
see the contents.
|
||||
|
||||
:::info pass
|
||||
|
||||
If no dialog is displayed, see the ["Installation Notes"](#complete-example) for
|
||||
more details. On Linux ARM64, KDialog or Zenity must be installed.
|
||||
|
||||
:::
|
||||
|
||||
Click "Export File" and enter `SheetJSNeu.xlsx` to write a new file.
|
||||
|
||||
:::caution pass
|
35
docz/docs/03-demos/06-desktop/06-reactnative.md → docz/docs/03-demos/19-desktop/06-reactnative.md
35
docz/docs/03-demos/06-desktop/06-reactnative.md → docz/docs/03-demos/19-desktop/06-reactnative.md
@ -28,7 +28,7 @@ and create native modules for selecting and reading files from the computer.
|
||||
The Windows and macOS demos create apps that look like the screenshots below:
|
||||
|
||||
<table><thead><tr>
|
||||
<th><a href="#windows-demo">Win10</a></th>
|
||||
<th><a href="#windows-demo">Windows</a></th>
|
||||
<th><a href="#macos-demo">macOS</a></th>
|
||||
</tr></thead><tbody><tr><td>
|
||||
|
||||
@ -40,17 +40,17 @@ The Windows and macOS demos create apps that look like the screenshots below:
|
||||
|
||||
</td></tr></tbody></table>
|
||||
|
||||
:::note
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was tested in the following environments:
|
||||
|
||||
| OS and Version | Arch | RN Platform | Date |
|
||||
|:---------------|:-----|:------------|:-----------|
|
||||
| Windows 10 | x64 | `v0.72.16` | 2023-10-27 |
|
||||
| Windows 11 | x64 | `v0.72.12` | 2023-10-14 |
|
||||
| Windows 11 | ARM | `v0.72.9` | 2023-09-18 |
|
||||
| MacOS 14.1 | x64 | `v0.72.5` | 2023-10-27 |
|
||||
| MacOS 13.5.2 | ARM | `v0.72.4` | 2023-09-18 |
|
||||
| OS and Version | Architecture | RN Platform | Date |
|
||||
|:---------------|:-------------|:------------|:-----------|
|
||||
| Windows 10 | `win10-x64` | `v0.72.16` | 2023-10-27 |
|
||||
| Windows 11 | `win11-x64` | `v0.72.12` | 2023-10-14 |
|
||||
| Windows 11 | `win11-arm` | `v0.72.20` | 2023-12-01 |
|
||||
| MacOS 14.1 | `darwin-x64` | `v0.72.5` | 2023-10-27 |
|
||||
| MacOS 14.1.2 | `darwin-arm` | `v0.72.11` | 2023-12-01 |
|
||||
|
||||
:::
|
||||
|
||||
@ -420,10 +420,10 @@ setup instructions" to find instructions for manual installation.
|
||||
|
||||
### Project Setup
|
||||
|
||||
1) Create a new project using React Native `0.72.6`:
|
||||
1) Create a new project using React Native `0.72.7`:
|
||||
|
||||
```bash
|
||||
npx react-native init SheetJSWin --template react-native@0.72.6
|
||||
npx react-native init SheetJSWin --template react-native@0.72.7
|
||||
cd SheetJSWin
|
||||
```
|
||||
|
||||
@ -858,6 +858,17 @@ highlighted lines:
|
||||
npx react-native run-macos
|
||||
```
|
||||
|
||||
:::note
|
||||
|
||||
If the app runs but no window is displayed, clear caches and try again:
|
||||
|
||||
```bash
|
||||
npx react-native clean --include metro,watchman
|
||||
npx react-native run-macos
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
Close the running app from the dock and close the Metro terminal window.
|
||||
|
||||
### Application
|
||||
@ -895,7 +906,7 @@ xcodebuild -workspace macos/SheetJSmacOS.xcworkspace -scheme SheetJSmacOS-macOS
|
||||
```
|
||||
|
||||
When the demo was last tested, the path to the generated app was displayed in
|
||||
the terminal. Search for `Release/SheetJSmacOS.app`:
|
||||
the terminal. Search for `Release/SheetJSmacOS.app` and look for `touch`:
|
||||
|
||||
```
|
||||
/usr/bin/touch -c /Users/sheetjs/Library/Developer/Xcode/DerivedData/SheetJSmacOS-abcdefghijklmnopqrstuvwxyzab/Build/Products/Release/SheetJSmacOS.app
|
@ -42,43 +42,49 @@ Options:
|
||||
...
|
||||
```
|
||||
|
||||
<details><summary><b>Tested Deployments</b> (click to show)</summary>
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was tested in the following deployments:
|
||||
|
||||
**`pkg`**
|
||||
|
||||
| Architecture | Version | Node Target | Date |
|
||||
|:-------------|:--------|:------------|:-----------|
|
||||
| `darwin-x64` | `5.8.1` | `18.5.0` | 2023-10-11 |
|
||||
| `darwin-arm` | `5.8.1` | `18.5.0` | 2023-09-25 |
|
||||
| `win10-x64` | `5.8.1` | `18.5.0` | 2023-10-09 |
|
||||
| `win11-arm` | `5.8.1` | `18.5.0` | 2023-09-25 |
|
||||
| `linux-x64` | `5.8.1` | `18.5.0` | 2023-10-11 |
|
||||
| `linux-arm` | `5.8.1` | `18.5.0` | 2023-09-25 |
|
||||
|
||||
**`nexe`**
|
||||
<Tabs groupId="njs">
|
||||
<TabItem value="nexe" label="Nexe">
|
||||
|
||||
| Architecture | Version | Node Target | Date |
|
||||
|:-------------|:-------------|:------------|:-----------|
|
||||
| `darwin-x64` | `4.0.0-rc.2` | `14.15.3` | 2023-10-10 |
|
||||
| `darwin-arm` | `4.0.0-rc.2` | `20.7.0` | 2023-09-25 |
|
||||
| `darwin-arm` | `4.0.0-rc.2` | `18.18.0` | 2023-12-01 |
|
||||
| `win10-x64` | `4.0.0-rc.2` | `14.15.3` | 2023-10-09 |
|
||||
| `win11-arm` | `4.0.0-rc.2` | `18.17.1` | 2023-09-25 |
|
||||
| `win11-arm` | `4.0.0-rc.2` | `20.10.0` | 2023-12-01 |
|
||||
| `linux-x64` | `4.0.0-rc.2` | `14.15.3` | 2023-10-11 |
|
||||
| `linux-arm` | `4.0.0-rc.2` | `20.7.0` | 2023-09-25 |
|
||||
| `linux-arm` | `4.0.0-rc.2` | `20.10.0` | 2023-12-01 |
|
||||
|
||||
**`boxednode`**
|
||||
</TabItem>
|
||||
<TabItem value="pkg" label="pkg">
|
||||
|
||||
| Architecture | Version | Node Target | Date |
|
||||
|:-------------|:--------|:------------|:-----------|
|
||||
| `darwin-x64` | `5.8.1` | `18.5.0` | 2023-10-11 |
|
||||
| `darwin-arm` | `5.8.1` | `18.5.0` | 2023-12-01 |
|
||||
| `win10-x64` | `5.8.1` | `18.5.0` | 2023-10-09 |
|
||||
| `win11-arm` | `5.8.1` | `18.5.0` | 2023-12-01 |
|
||||
| `linux-x64` | `5.8.1` | `18.5.0` | 2023-10-11 |
|
||||
| `linux-arm` | `5.8.1` | `18.5.0` | 2023-12-01 |
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="boxednode" label="boxednode">
|
||||
|
||||
| Architecture | Version | Node Target | Date |
|
||||
|:-------------|:--------|:------------|:-----------|
|
||||
| `darwin-x64` | `2.1.2` | `20.8.0` | 2023-10-12 |
|
||||
| `darwin-arm` | `2.1.1` | `20.7.0` | 2023-09-25 |
|
||||
| `darwin-arm` | `2.3.0` | `21.3.0` | 2023-12-01 |
|
||||
| `win10-x64` | `2.1.2` | `16.20.2` | 2023-10-09 |
|
||||
| `linux-x64` | `2.1.2` | `20.8.0` | 2023-10-11 |
|
||||
| `linux-arm` | `2.1.1` | `20.7.0` | 2023-09-25 |
|
||||
| `linux-arm` | `2.3.0` | `21.3.0` | 2023-12-01 |
|
||||
|
||||
</details>
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
:::
|
||||
|
||||
0) Download the test file <https://sheetjs.com/pres.numbers>:
|
||||
|
||||
@ -114,7 +120,7 @@ yarn add https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz exit-on-epi
|
||||
|
||||
3) Follow tooling steps:
|
||||
|
||||
<Tabs>
|
||||
<Tabs groupId="njs">
|
||||
<TabItem value="nexe" label="Nexe">
|
||||
|
||||
Run `nexe` and manually specify NodeJS version 14.15.3
|
||||
@ -134,10 +140,41 @@ missing. The package must be built from source:
|
||||
npx nexe xlsx-cli.js --build --python=$(which python3) --make="-j8"
|
||||
```
|
||||
|
||||
On Windows ARM, the target `windows-arm64-18.17.1` must be specified:
|
||||
:::
|
||||
|
||||
:::caution pass
|
||||
|
||||
On Windows ARM, the target `windows-arm64-20.10.0` must be specified:
|
||||
|
||||
```bash
|
||||
npx nexe xlsx-cli.js --build --python=$(which python3) --make="-j8" --target=windows-arm64-18.17.1
|
||||
npx nexe xlsx-cli.js --build --make="-j8" --target=windows-arm64-20.10.0
|
||||
```
|
||||
|
||||
The Windows build may fail with a `vcbuild.bat` error:
|
||||
|
||||
```
|
||||
Error: vcbuild.bat nosign release arm64 exited with code: 1
|
||||
```
|
||||
|
||||
Pass the `-v` flag for more details. In the most recent test, the error stemmed
|
||||
from a Python version mismatch:
|
||||
|
||||
```
|
||||
Node.js configure: found Python 2.7.18
|
||||
Please use python3.11 or python3.10 or python3.9 or python3.8 or python3.7 or python3.6
|
||||
```
|
||||
|
||||
The resolved version of Python can be found with
|
||||
|
||||
```cmd
|
||||
where python
|
||||
```
|
||||
|
||||
In the most recent test, a Python 2 version appeared first. This was fixed by
|
||||
finding the Python 3 location and prepending it to `PATH`:
|
||||
|
||||
```cmd
|
||||
set PATH="C:\correct\path\to\python\three";%PATH%
|
||||
```
|
||||
|
||||
:::
|
||||
@ -145,6 +182,35 @@ npx nexe xlsx-cli.js --build --python=$(which python3) --make="-j8" --target=win
|
||||
</TabItem>
|
||||
<TabItem value="pkg" label="pkg">
|
||||
|
||||
:::warning pass
|
||||
|
||||
When this demo was last tested, `pkg` failed with an error referencing `node20`:
|
||||
|
||||
```
|
||||
> Targets not specified. Assuming:
|
||||
node20-linux-arm64, node20-macos-arm64, node20-win-arm64
|
||||
> Error! No available node version satisfies 'node20'
|
||||
```
|
||||
|
||||
**`pkg` does not support NodeJS 20!**
|
||||
|
||||
The local NodeJS version must be rolled back to version 18.
|
||||
|
||||
If `n` is installed:
|
||||
|
||||
```bash
|
||||
sudo n 18
|
||||
```
|
||||
|
||||
If `nvm` was used to install NodeJS:
|
||||
|
||||
```bash
|
||||
nvm install 18
|
||||
nvm use 18
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
Run `pkg`:
|
||||
|
||||
```bash
|
||||
@ -162,7 +228,7 @@ Run `boxednode`:
|
||||
<TabItem value="unix" label="Linux/MacOS">
|
||||
|
||||
```bash
|
||||
npx boxednode@2.1.2 -s xlsx-cli.js -t xlsx-cli
|
||||
npx boxednode@2.3.0 -s xlsx-cli.js -t xlsx-cli
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@ -233,7 +299,7 @@ example, `nexe` generates `xlsx-cli` in macOS so the command is:
|
||||
The [V8](/docs/demos/engines/v8) demo covers standalone programs that embed the
|
||||
V8 engine. This demo uses the Rust integration to generate a command line tool.
|
||||
|
||||
<details><summary><b>Tested Deployments</b> (click to show)</summary>
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was last tested in the following deployments:
|
||||
|
||||
@ -244,27 +310,10 @@ This demo was last tested in the following deployments:
|
||||
| `win10-x64` | `11.8.172.13` | `0.79.2` | 2023-10-09 |
|
||||
| `win11-x64` | `11.8.172.13` | `0.79.2` | 2023-10-14 |
|
||||
| `linux-x64` | `11.8.172.13` | `0.79.2` | 2023-10-11 |
|
||||
| `linux-arm` | `11.7.439.6` | `0.75.1` | 2023-08-30 |
|
||||
|
||||
:::caution pass
|
||||
|
||||
Using crate version `0.71.2`, the Linux AArch64 build failed with an error:
|
||||
|
||||
```
|
||||
error[E0080]: evaluation of constant value failed
|
||||
|
||||
|
|
||||
1715 | assert!(size_of::<TypeId>() == size_of::<u64>());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: size_of::<TypeId>() == size_of::<u64>()'
|
||||
```
|
||||
|
||||
This was fixed in version `0.75.1` of the crate.
|
||||
| `linux-arm` | `12.0.267.8` | `0.82.0` | 2023-12-01 |
|
||||
|
||||
:::
|
||||
|
||||
|
||||
</details>
|
||||
|
||||
0) Make a new folder for the project:
|
||||
|
||||
```bash
|
||||
@ -301,6 +350,23 @@ cargo build --bin snapshot
|
||||
cargo run --bin snapshot
|
||||
```
|
||||
|
||||
:::caution pass
|
||||
|
||||
With some versions of the `v8` crate, the Linux AArch64 build failed with an error:
|
||||
|
||||
```
|
||||
error[E0080]: evaluation of constant value failed
|
||||
|
||||
|
|
||||
1715 | assert!(size_of::<TypeId>() == size_of::<u64>());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: size_of::<TypeId>() == size_of::<u64>()'
|
||||
```
|
||||
|
||||
Versions `0.75.1` and `0.82.0` are known to work.
|
||||
|
||||
:::
|
||||
|
||||
|
||||
4) Build `sheet2csv` (`sheet2csv.exe` in Windows):
|
||||
|
||||
```bash
|
||||
@ -344,7 +410,7 @@ to read files from the filesystem with `Deno.readFileSync`.
|
||||
|
||||
<https://docs.sheetjs.com/cli/sheet2csv.ts> can be compiled and run from Deno.
|
||||
|
||||
<details><summary><b>Tested Deployments</b> (click to show)</summary>
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was last tested in the following deployments:
|
||||
|
||||
@ -354,19 +420,21 @@ This demo was last tested in the following deployments:
|
||||
| `darwin-arm` | `1.37.2` | 2023-10-18 |
|
||||
| `win10-x64` | `1.37.1` | 2023-10-09 |
|
||||
| `win11-x64` | `1.37.2` | 2023-10-14 |
|
||||
| `win11-arm` | `1.37.0` | 2023-09-26 |
|
||||
| `win11-arm` | `1.38.4` | 2023-12-01 |
|
||||
| `linux-x64` | `1.37.1` | 2023-10-11 |
|
||||
| `linux-arm` | `1.36.3` | 2023-08-30 |
|
||||
| `linux-arm` | `1.38.4` | 2023-12-01 |
|
||||
|
||||
</details>
|
||||
:::
|
||||
|
||||
0) Download the test file <https://sheetjs.com/pres.numbers>:
|
||||
0) Install Deno.[^2]
|
||||
|
||||
1) Download the test file <https://sheetjs.com/pres.numbers>:
|
||||
|
||||
```bash
|
||||
curl -LO https://sheetjs.com/pres.numbers
|
||||
```
|
||||
|
||||
1) Test the script with `deno run`:
|
||||
2) Test the script with `deno run`:
|
||||
|
||||
```bash
|
||||
deno run -r --allow-read https://docs.sheetjs.com/cli/sheet2csv.ts pres.numbers
|
||||
@ -374,7 +442,7 @@ deno run -r --allow-read https://docs.sheetjs.com/cli/sheet2csv.ts pres.numbers
|
||||
|
||||
If this worked, the program will print a CSV of the first worksheet.
|
||||
|
||||
2) Compile and run `sheet2csv`:
|
||||
3) Compile and run `sheet2csv`:
|
||||
|
||||
```bash
|
||||
deno compile -r --allow-read https://docs.sheetjs.com/cli/sheet2csv.ts
|
||||
@ -391,4 +459,5 @@ The following demos for JS engines produce standalone programs:
|
||||
- [Goja](/docs/demos/engines/goja)
|
||||
- [JavaScriptCore](/docs/demos/engines/jsc)
|
||||
|
||||
[^1]: Downloads can be found [at the main NASM project website](https://www.nasm.us/)
|
||||
[^1]: Downloads can be found [at the main NASM project website](https://www.nasm.us/)
|
||||
[^2]: [The official instructions](https://docs.deno.com/runtime/manual/getting_started/installation) cover most platforms. Deno does not provide official Linux ARM64 builds, but [there are unofficial community builds](https://github.com/LukeChannings/deno-arm64).
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Desktop and CLI Tools",
|
||||
"position": 6
|
||||
"position": 19
|
||||
}
|
@ -124,7 +124,7 @@ The resulting `buf` can be written to file with `fwrite`.
|
||||
|
||||
## Complete Example
|
||||
|
||||
:::note
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was tested in the following deployments:
|
||||
|
||||
@ -133,9 +133,9 @@ This demo was tested in the following deployments:
|
||||
| `darwin-x64` | `2.7.0` | 2023-10-26 |
|
||||
| `darwin-arm` | `2.7.0` | 2023-10-18 |
|
||||
| `win10-x64` | `2.7.0` | 2023-10-27 |
|
||||
| `win11-arm` | `2.7.0` | 2023-09-26 |
|
||||
| `win11-arm` | `2.7.0` | 2023-12-01 |
|
||||
| `linux-x64` | `2.7.0` | 2023-10-11 |
|
||||
| `linux-arm` | `2.7.0` | 2023-08-30 |
|
||||
| `linux-arm` | `2.7.0` | 2023-12-01 |
|
||||
|
||||
:::
|
||||
|
||||
@ -355,13 +355,14 @@ The Perl binding does not have raw `Buffer` ops, so Base64 strings are used.
|
||||
|
||||
#### Perl Demo
|
||||
|
||||
:::note
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Version | Date |
|
||||
|:-------------|:--------|:-----------|
|
||||
| `darwin-x64` | `2.5.0` | 2023-10-26 |
|
||||
| `linux-arm` | `2.5.0` | 2023-12-01 |
|
||||
|
||||
:::
|
||||
|
||||
@ -373,6 +374,16 @@ This demo was tested in the following deployments:
|
||||
cpan install JavaScript::Duktape
|
||||
```
|
||||
|
||||
:::note pass
|
||||
|
||||
On some systems, the command must be run as the root user:
|
||||
|
||||
```bash
|
||||
sudo cpan install JavaScript::Duktape
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
2) Save the following codeblock to `SheetJSDuk.pl`:
|
||||
|
||||
```perl title="SheetJSDuk.pl"
|
||||
@ -425,4 +436,20 @@ perl SheetJSDuk.pl pres.xlsx
|
||||
```
|
||||
|
||||
If the script succeeded, the data in the test file will be printed in CSV rows.
|
||||
The script will also export `SheetJSDuk.xlsb`.
|
||||
The script will also export `SheetJSDuk.xlsb`.
|
||||
|
||||
:::note pass
|
||||
|
||||
In the latest Linux ARM64 test, the command failed due to missing `File::Slurp`:
|
||||
|
||||
```
|
||||
Can't locate File/Slurp.pm in @INC (you may need to install the File::Slurp module)
|
||||
```
|
||||
|
||||
The fix is to install `File::Slurp` with `cpan`:
|
||||
|
||||
```bash
|
||||
sudo cpan install File::Slurp
|
||||
```
|
||||
|
||||
:::
|
@ -125,10 +125,10 @@ This demo was tested in the following deployments:
|
||||
| V8 Version | Platform | OS Version | Compiler | Date |
|
||||
|:--------------|:-------------|:--------------|:-----------------|:-----------|
|
||||
| `12.1.131` | `darwin-x64` | macOS 14.1 | `clang 15.0.0` | 2023-11-15 |
|
||||
| `12.0.175` | `darwin-arm` | macOS 14.0 | `clang 15.0.0` | 2023-10-20 |
|
||||
| `12.1.283` | `darwin-arm` | macOS 14.1.2 | `clang 15.0.0` | 2023-12-01 |
|
||||
| `12.0.265` | `win10-x64` | Windows 10 | `CL 19.37.32822` | 2023-10-28 |
|
||||
| `12.1.222` | `linux-x64` | HoloOS 3.5.7 | `gcc 13.1.1` | 2023-11-27 |
|
||||
| `11.8.82` | `linux-arm` | Debian 11 | `gcc 10.2.1` | 2023-09-26 |
|
||||
| `11.8.82` | `linux-arm` | Debian 12 | `gcc 12.2.0` | 2023-12-01 |
|
||||
|
||||
:::
|
||||
|
||||
@ -160,7 +160,7 @@ mkdir -p /usr/local/lib
|
||||
cd /usr/local/lib
|
||||
```
|
||||
|
||||
:::caution pass
|
||||
:::note pass
|
||||
|
||||
If this step throws a permission error, run:
|
||||
|
||||
@ -224,6 +224,17 @@ git config --global branch.autosetuprebase always
|
||||
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
```
|
||||
|
||||
:::note pass
|
||||
|
||||
If this step throws a permission error, run:
|
||||
|
||||
```bash
|
||||
sudo mkdir -p /usr/local/lib
|
||||
sudo chmod 777 /usr/local/lib
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
|
||||
@ -395,20 +406,11 @@ The recommended fix is to delete the referenced folder and re-run `gclient sync`
|
||||
</Tabs>
|
||||
|
||||
|
||||
5) Checkout the desired version. The following command pulls `12.0.265`:
|
||||
5) Checkout the desired version. The following command pulls `12.1.283`:
|
||||
|
||||
<Tabs groupId="os">
|
||||
<TabItem value="unix" label="Linux/MacOS">
|
||||
|
||||
```bash
|
||||
git checkout refs/tags/12.0.265 -b sample -t
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="win" label="Windows">
|
||||
|
||||
```bash
|
||||
git checkout tags/12.0.265 -b sample
|
||||
git checkout tags/12.1.283 -b sample
|
||||
```
|
||||
|
||||
:::caution pass
|
||||
@ -416,21 +418,18 @@ git checkout tags/12.0.265 -b sample
|
||||
The official documentation recommends:
|
||||
|
||||
```bash
|
||||
git checkout refs/tags/12.0.265 -b sample -t
|
||||
git checkout refs/tags/12.1.283 -b sample -t
|
||||
```
|
||||
|
||||
This command failed in local testing:
|
||||
|
||||
```
|
||||
E:\v8\v8>git checkout refs/tags/12.0.265 -b sample -t
|
||||
fatal: cannot set up tracking information; starting point 'refs/tags/12.0.265' is not a branch
|
||||
E:\v8\v8>git checkout refs/tags/12.1.283 -b sample -t
|
||||
fatal: cannot set up tracking information; starting point 'refs/tags/12.1.283' is not a branch
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
### Build V8
|
||||
|
||||
6) Build the static library.
|
||||
@ -489,10 +488,11 @@ treat_warnings_as_errors = false
|
||||
tools/dev/v8gen.py arm64.release.sample
|
||||
```
|
||||
|
||||
Append the following line to `out.gn/arm64.release.sample/args.gn`:
|
||||
Append the following lines to `out.gn/arm64.release.sample/args.gn`:
|
||||
|
||||
```text title="out.gn/arm64.release.sample/args.gn (add to file)"
|
||||
is_clang = false
|
||||
treat_warnings_as_errors = false
|
||||
```
|
||||
|
||||
Run the build:
|
||||
@ -813,10 +813,10 @@ This demo was last tested in the following deployments:
|
||||
| Architecture | V8 Crate | Date |
|
||||
|:-------------|:---------|:-----------|
|
||||
| `darwin-x64` | `0.81.0` | 2023-11-14 |
|
||||
| `darwin-arm` | `0.79.2` | 2023-10-18 |
|
||||
| `darwin-arm` | `0.82.0` | 2023-12-01 |
|
||||
| `win10-x64` | `0.81.0` | 2023-11-14 |
|
||||
| `linux-x64` | `0.81.0` | 2023-11-27 |
|
||||
| `linux-arm` | `0.75.1` | 2023-08-30 |
|
||||
| `linux-arm` | `0.82.0` | 2023-12-01 |
|
||||
|
||||
:::
|
||||
|
||||
|
@ -41,7 +41,7 @@ setting the environment variable on supported platforms.
|
||||
:::note pass
|
||||
|
||||
Most of the integration functions are not documented. This explanation is based
|
||||
on version `3.0.0-beta-2055`.
|
||||
on version `3.0.0-beta-2056`.
|
||||
|
||||
:::
|
||||
|
||||
@ -157,18 +157,18 @@ System.IO.File.WriteAllBytes("SheetJSJint.xlsb", outfile);
|
||||
|
||||
## Integration Example
|
||||
|
||||
:::note
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Jint Version | Date |
|
||||
|:-------------|:------------------|:-----------|
|
||||
| `darwin-x64` | `3.0.0-beta-2055` | 2023-11-14 |
|
||||
| `darwin-arm` | `3.0.0-beta-2051` | 2023-09-26 |
|
||||
| `darwin-arm` | `3.0.0-beta-2056` | 2023-12-01 |
|
||||
| `win10-x64` | `3.0.0-beta-2053` | 2023-10-28 |
|
||||
| `win11-arm` | `3.0.0-beta-2051` | 2023-09-26 |
|
||||
| `win11-arm` | `3.0.0-beta-2056` | 2023-12-01 |
|
||||
| `linux-x64` | `3.0.0-beta-2052` | 2023-10-11 |
|
||||
| `linux-arm` | `3.0.0-beta-2051` | 2023-09-26 |
|
||||
| `linux-arm` | `3.0.0-beta-2056` | 2023-12-01 |
|
||||
|
||||
:::
|
||||
|
||||
@ -238,7 +238,7 @@ dotnet run
|
||||
|
||||
```bash
|
||||
dotnet nuget add source https://www.myget.org/F/jint/api/v3/index.json
|
||||
dotnet add package Jint --version 3.0.0-beta-2055
|
||||
dotnet add package Jint --version 3.0.0-beta-2056
|
||||
```
|
||||
|
||||
To verify Jint is installed, replace `Program.cs` with the following:
|
||||
|
@ -88,7 +88,7 @@ _ = ioutil.WriteFile("sheetjs.xlsx", buf, 0644)
|
||||
|
||||
## Complete Example
|
||||
|
||||
:::note
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was tested in the following deployments:
|
||||
|
||||
@ -97,9 +97,9 @@ This demo was tested in the following deployments:
|
||||
| `darwin-x64` | `873a149` | `1.21.3` | 2023-10-14 |
|
||||
| `darwin-arm` | `873a149` | `1.21.3` | 2023-10-18 |
|
||||
| `win10-x64` | `b396bb4` | `1.21.3` | 2023-10-28 |
|
||||
| `win11-arm` | `fc55792` | `1.21.1` | 2023-09-25 |
|
||||
| `win11-arm` | `b396bb4` | `1.21.1` | 2023-12-01 |
|
||||
| `linux-x64` | `fc55792` | `1.21.3` | 2023-10-11 |
|
||||
| `linux-arm` | `3dbe69d` | `1.21.1` | 2023-08-30 |
|
||||
| `linux-arm` | `b396bb4` | `1.21.4` | 2023-12-01 |
|
||||
|
||||
At the time of writing, Goja did not have proper version numbers. Versions are
|
||||
identified by Git commit hashes.
|
||||
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
title: Java + Nashorn
|
||||
title: Data Processing with Nashorn
|
||||
sidebar_label: Java + Nashorn
|
||||
pagination_prev: demos/bigdata/index
|
||||
pagination_next: solutions/input
|
||||
---
|
||||
@ -9,18 +10,22 @@ import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
|
||||
Nashorn is a JavaScript engine for Java. It shipped with Java distributions
|
||||
starting with Java 8 and was eventually removed in Java 15. The project was
|
||||
spun off and a compatible standalone release is available for Java 15+.
|
||||
[Nashorn](https://openjdk.org/projects/nashorn/) is a JS engine for Java. It
|
||||
shipped with Java distributions starting with Java 8 and was eventually removed
|
||||
in Java 15. The project was spun off and a compatible standalone release is
|
||||
available for Java 15+.
|
||||
|
||||
The [SheetJS Standalone scripts](/docs/getting-started/installation/standalone)
|
||||
can be parsed and evaluated in a Nashorn context.
|
||||
[SheetJS](https://sheetjs.com) is a JavaScript library for reading and writing
|
||||
data from spreadsheets.
|
||||
|
||||
The ["Complete Example"](#complete-example) section includes a complete Java
|
||||
command-line tool for reading data from spreadsheets and printing CSV rows.
|
||||
|
||||
## Integration Details
|
||||
|
||||
_Initialize Nashorn_
|
||||
### Initialize Nashorn
|
||||
|
||||
`global` must be created from a Nashorn engine:
|
||||
Nashorn does not provide a `global` variable. It must be created:
|
||||
|
||||
```java
|
||||
import javax.script.ScriptEngine;
|
||||
@ -33,10 +38,14 @@ import java.util.Scanner;
|
||||
ScriptEngine engine = (new ScriptEngineManager()).getEngineByName("javascript");
|
||||
|
||||
/* create global */
|
||||
// highlight-next-line
|
||||
engine.eval("var global = (function(){ return this; }).call(null);");
|
||||
```
|
||||
|
||||
_Load SheetJS Scripts_
|
||||
### Load SheetJS Scripts
|
||||
|
||||
The [SheetJS Standalone scripts](/docs/getting-started/installation/standalone)
|
||||
can be parsed and evaluated in a Nashorn context.
|
||||
|
||||
The main library can be loaded by reading the script from the file system and
|
||||
evaluating in the Nashorn context:
|
||||
@ -90,19 +99,26 @@ engine.eval("var wb = XLSX.read(u8a, {type: 'array'})");
|
||||
|
||||
## Complete Example
|
||||
|
||||
:::note
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was tested in the following deployments:
|
||||
|
||||
| OpenJDK | Nashorn | Date |
|
||||
|:--------|:----------------|:-----------|
|
||||
| 21-rc34 | 15.4 standalone | 2023-08-28 |
|
||||
| 20.0.2 | 15.4 standalone | 2023-08-28 |
|
||||
| 19.0.2 | 15.4 standalone | 2023-08-28 |
|
||||
| 17.0.8 | 15.4 standalone | 2023-08-28 |
|
||||
| 15.0.10 | 15.4 standalone | 2023-08-28 |
|
||||
| 11.0.20 | Built-in | 2023-08-28 |
|
||||
| 1.8.0 | Built-in | 2023-08-28 |
|
||||
| 21.0.1 | 15.4 standalone | 2023-12-01 |
|
||||
| 20.0.2 | 15.4 standalone | 2023-12-01 |
|
||||
| 19.0.2 | 15.4 standalone | 2023-12-01 |
|
||||
| 18.0.2 | 15.4 standalone | 2023-12-01 |
|
||||
| 17.0.9 | 15.4 standalone | 2023-12-01 |
|
||||
| 16.0.1 | 15.4 standalone | 2023-12-01 |
|
||||
| 15.0.10 | 15.4 standalone | 2023-12-01 |
|
||||
| 14.0.2 | Built-in | 2023-12-01 |
|
||||
| 13.0.14 | Built-in | 2023-12-01 |
|
||||
| 12.0.2 | Built-in | 2023-12-01 |
|
||||
| 11.0.20 | Built-in | 2023-12-01 |
|
||||
| 10.0.2 | Built-in | 2023-12-01 |
|
||||
| 9 | Built-in | 2023-12-01 |
|
||||
| 1.8.0 | Built-in | 2023-12-01 |
|
||||
|
||||
:::
|
||||
|
||||
@ -117,12 +133,12 @@ Nashorn is available without additional dependencies
|
||||
0) Download Nashorn and its dependencies:
|
||||
|
||||
```bash
|
||||
curl -LO "https://search.maven.org/remotecontent?filepath=org/openjdk/nashorn/nashorn-core/15.4/nashorn-core-15.4.jar"
|
||||
curl -LO "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm/9.5/asm-9.5.jar"
|
||||
curl -LO "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar"
|
||||
curl -LO "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar"
|
||||
curl -LO "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar"
|
||||
curl -LO "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-util/9.5/asm-util-9.5.jar"
|
||||
curl -L -o nashorn-core-15.4.jar "https://search.maven.org/remotecontent?filepath=org/openjdk/nashorn/nashorn-core/15.4/nashorn-core-15.4.jar"
|
||||
curl -L -o asm-9.5.jar "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm/9.5/asm-9.5.jar"
|
||||
curl -L -o asm-tree-9.5.jar "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar"
|
||||
curl -L -o asm-commons-9.5.jar "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar"
|
||||
curl -L -o asm-analysis-9.5.jar "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar"
|
||||
curl -L -o asm-util-9.5.jar "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-util/9.5/asm-util-9.5.jar"
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@ -155,7 +171,8 @@ curl -LO https://docs.sheetjs.com/nashorn/SheetJSNashorn.java
|
||||
javac SheetJSNashorn.java
|
||||
```
|
||||
|
||||
This program tries to parse the file specified by the first argument
|
||||
This program tries to parse the file specified by the first argument and prints
|
||||
CSV rows from the first worksheet.
|
||||
|
||||
4) Run the command directly:
|
||||
|
||||
@ -212,3 +229,4 @@ java -cp .:asm-9.5.jar:asm-tree-9.5.jar:asm-commons-9.5.jar:asm-analysis-9.5.jar
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
This should print the same CSV rows from Step 3.
|
||||
|
@ -256,7 +256,7 @@ while the "CLI Test" demonstrates other concepts using the `quickjs` CLI tool.
|
||||
|
||||
### Integration Example
|
||||
|
||||
:::note
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was tested in the following deployments:
|
||||
|
||||
@ -265,11 +265,11 @@ This demo was tested in the following deployments:
|
||||
| `darwin-x64` | `2788d71` | 2023-10-26 |
|
||||
| `darwin-arm` | `2788d71` | 2023-10-18 |
|
||||
| `win10-x64` | `2788d71` | 2023-10-09 |
|
||||
| `win11-arm` | `2788d71` | 2023-09-25 |
|
||||
| `win11-arm` | `03cc5ec` | 2023-12-01 |
|
||||
| `linux-x64` | `2788d71` | 2023-10-11 |
|
||||
| `linux-arm` | `2788d71` | 2023-08-29 |
|
||||
| `linux-arm` | `03cc5ec` | 2023-12-01 |
|
||||
|
||||
When the demo was tested, commit `2788d71` corresponded to the latest release.
|
||||
When the demo was tested, commit `03cc5ec` corresponded to the latest commit.
|
||||
|
||||
:::
|
||||
|
||||
@ -285,7 +285,7 @@ tests were run entirely within Windows Subsystem for Linux.
|
||||
```bash
|
||||
git clone https://github.com/bellard/quickjs
|
||||
cd quickjs
|
||||
git checkout 2788d71
|
||||
git checkout 03cc5ec
|
||||
make
|
||||
cd ..
|
||||
```
|
||||
|
@ -365,7 +365,7 @@ This demo was tested in the following deployments:
|
||||
| `darwin-x64` | `84732b3` | 2023-11-14 |
|
||||
| `darwin-arm` | `2b4f949` | 2023-10-18 |
|
||||
| `linux-x64` | `2b4f949` | 2023-10-11 |
|
||||
| `linux-arm` | `70af78b` | 2023-08-27 |
|
||||
| `linux-arm` | `84732b3` | 2023-12-01 |
|
||||
|
||||
The main Hermes source tree does not have Windows support. The `hermes-windows`
|
||||
fork, which powers React Native for Windows, does have built-in support[^5]
|
||||
|
@ -64,20 +64,20 @@ The `strict_` variants ensure that no newlines are added to the strings.
|
||||
|
||||
## Complete Example
|
||||
|
||||
:::note
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was tested in the following deployments:
|
||||
|
||||
| Platform | Ruby | ExecJS | Date |
|
||||
|:-------------|:---------|:--------|:-----------|
|
||||
| `darwin-x64` | `2.6.10` | `2.9.1` | 2023-11-14 |
|
||||
| `darwin-arm` | `2.7.4` | `2.9.1` | 2023-09-24 |
|
||||
| `darwin-arm` | `2.6.10` | `2.9.1` | 2023-12-01 |
|
||||
| `win10-x64` | `3.2.2` | `2.9.1` | 2023-10-28 |
|
||||
| `win11-arm` | `3.0.2` | `2.9.1` | 2023-09-24 |
|
||||
| `win11-arm` | `3.0.2` | `2.9.1` | 2023-12-01 |
|
||||
| `linux-x64` | `3.0.4` | `2.9.1` | 2023-10-11 |
|
||||
| `linux-arm` | `2.7.4` | `2.9.1` | 2023-09-24 |
|
||||
| `linux-arm` | `2.7.4` | `2.9.1` | 2023-12-01 |
|
||||
|
||||
Note: The Windows 11 ARM64 test used the Ruby version that ships with WSL.
|
||||
**Note: The Windows 11 ARM64 test used the Ruby version that ships with WSL.**
|
||||
|
||||
:::
|
||||
|
||||
|
@ -123,9 +123,9 @@ This demo was tested in the following deployments:
|
||||
| `darwin-x64` | 2023-11-03 |
|
||||
| `darwin-arm` | 2023-10-20 |
|
||||
| `win10-x64` | 2023-10-28 |
|
||||
| `win11-arm` | 2023-09-26 |
|
||||
| `win11-arm` | 2023-12-01 |
|
||||
| `linux-x64` | 2023-10-11 |
|
||||
| `linux-arm` | 2023-08-30 |
|
||||
| `linux-arm` | 2023-12-01 |
|
||||
|
||||
:::
|
||||
|
||||
|
@ -40,9 +40,9 @@ These instructions were tested on the following platforms:
|
||||
| Platform | Test Date |
|
||||
|:------------------------------|:-----------|
|
||||
| Linux (Steam Deck Holo x64) | 2023-11-27 |
|
||||
| Linux (Ubuntu 18 AArch64) | 2023-09-07 |
|
||||
| Linux (Ubuntu 18 AArch64) | 2023-12-01 |
|
||||
| MacOS 10.13.6 (x64) | 2023-09-30 |
|
||||
| MacOS 13.6 (ARM64) | 2023-09-30 |
|
||||
| MacOS 14.1.2 (ARM64) | 2023-12-01 |
|
||||
| Windows 10 (x64) + WSL Ubuntu | 2023-11-27 |
|
||||
| Windows 11 (x64) + WSL Ubuntu | 2023-10-14 |
|
||||
| Windows 11 (ARM) + WSL Ubuntu | 2023-09-18 |
|
||||
@ -360,7 +360,7 @@ This is *not required* for building or testing the library.
|
||||
|
||||
</details>
|
||||
|
||||
After installing mercurial and subversion, install NodeJS.
|
||||
B) After installing mercurial and subversion, install NodeJS.
|
||||
|
||||
:::note pass
|
||||
|
||||
@ -388,6 +388,20 @@ nvm use 16
|
||||
|
||||
:::
|
||||
|
||||
C) Run `unzip`. If the program is missing, install manually. Using `apt-get`:
|
||||
|
||||
```bash
|
||||
sudo apt-get install -y unzip
|
||||
```
|
||||
|
||||
D) Run `make`. If the program is missing, install manually. It is strongly
|
||||
recommended to install `build-essential` on Debian and Ubuntu:
|
||||
|
||||
```bash
|
||||
sudo apt-get install -y make
|
||||
```
|
||||
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
@ -424,11 +438,22 @@ git config --global http.sslVerify true
|
||||
|
||||
1) Install NodeJS modules for building the scripts:
|
||||
|
||||
```bash
|
||||
npm i
|
||||
npm i -g mocha@2.5.3 voc @sheetjs/uglify-js
|
||||
```
|
||||
|
||||
:::caution pass
|
||||
|
||||
If `npm i -g` fails with a permissions issue, run the command with `sudo`:
|
||||
|
||||
```bash
|
||||
npm i
|
||||
sudo npm i -g mocha@2.5.3 voc @sheetjs/uglify-js
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
:::note Older Versions of Dependencies
|
||||
|
||||
Some of the dependencies are wildly out of date. While SheetJS aims to run in
|
||||
|
@ -5,7 +5,7 @@ hide_table_of_contents: true
|
||||
---
|
||||
|
||||
<head>
|
||||
<script src="/dta/dta.min.js"></script>
|
||||
<script src="https://cdn.sheetjs.com/dta-0.0.1/package/dist/dta.min.js"></script>
|
||||
</head>
|
||||
|
||||
:::info pass
|
||||
|
@ -4,7 +4,7 @@ version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
v8 = "0.79.2"
|
||||
v8 = "0.82.0"
|
||||
|
||||
[[bin]]
|
||||
name = "sheet2csv"
|
||||
|
2
docz/static/dta/dta.min.js
vendored
2
docz/static/dta/dta.min.js
vendored
File diff suppressed because one or more lines are too long
@ -15,12 +15,12 @@
|
||||
"make": "electron-forge make"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron-forge/cli": "6.4.2",
|
||||
"@electron-forge/maker-deb": "6.4.2",
|
||||
"@electron-forge/maker-rpm": "6.4.2",
|
||||
"@electron-forge/maker-squirrel": "6.4.2",
|
||||
"@electron-forge/maker-zip": "6.4.2",
|
||||
"electron": "27.0.0"
|
||||
"@electron-forge/cli": "7.2.0",
|
||||
"@electron-forge/maker-deb": "7.2.0",
|
||||
"@electron-forge/maker-rpm": "7.2.0",
|
||||
"@electron-forge/maker-squirrel": "7.2.0",
|
||||
"@electron-forge/maker-zip": "7.2.0",
|
||||
"electron": "27.1.3"
|
||||
},
|
||||
"config": {
|
||||
"forge": {
|
||||
|
Loading…
Reference in New Issue
Block a user