This commit is contained in:
SheetJS 2023-09-27 00:43:00 -04:00
parent 18bfc66fac
commit 79aacab553
17 changed files with 244 additions and 43 deletions

View File

@ -113,10 +113,11 @@ This demo was tested in the following environments:
| OS and Version | Arch | NW.js | Date |
|:---------------|:-----|:---------|:-----------|
| macOS 13.4.1 | x64 | `0.78.0` | 2023-07-27 |
| Windows 10 | x64 | `0.78.0` | 2023-07-27 |
| Windows 10 | ARM | `0.80.0` | 2023-09-25 |
| Linux (HoloOS) | x64 | `0.78.0` | 2023-07-27 |
| 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-09-27 |
:::
@ -129,7 +130,7 @@ This demo was tested in the following environments:
"version": "0.0.0",
"main": "index.html",
"dependencies": {
"nw": "~0.80.0",
"nw": "0.78.1",
"xlsx": "https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz"
}
}`}
@ -150,7 +151,11 @@ In the terminal window, the download can be performed with:
curl -LO https://docs.sheetjs.com/nwjs/index.html
```
3) Run `npm i` to install dependencies
3) Install dependencies:
```bash
npm i
```
4) To verify the app works, run in the test environment:
@ -164,7 +169,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 --glob=false --outDir=../out ./
npx -p nw-builder nwbuild --mode=build --version=0.78.1 --glob=false --outDir=../out ./
```
This will generate the standalone app in the `..\build\sheetjs-nwjs\` folder.
This will generate the standalone app in the `..\out\` folder.

View File

@ -260,7 +260,9 @@ This demo was tested in the following environments:
| macOS 13.4.0 | x64 | `v1.4.0` | 2023-06-25 |
| macOS 13.4.1 | ARM | `v1.4.0` | 2023-06-29 |
| Windows 10 | x64 | `v1.4.1` | 2023-07-30 |
| Windows 11 | ARM | `v1.4.1` | 2023-09-26 |
| Linux (HoloOS) | x64 | `v1.4.1` | 2023-07-30 |
| Linux (Debian) | ARM | `v1.4.1` | 2023-09-26 |
:::

View File

@ -345,6 +345,7 @@ This demo was last tested in the following deployments:
| `darwin-x64` | `1.33.2` | 2023-05-08 |
| `darwin-arm` | `1.34.1` | 2023-06-05 |
| `win10-x64` | `1.33.2` | 2023-05-08 |
| `win11-arm` | `1.37.0` | 2023-09-26 |
| `linux-x64` | `1.33.2` | 2023-05-08 |
| `linux-arm` | `1.36.3` | 2023-08-30 |

View File

@ -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';
Duktape is an embeddable JS engine written in C. It has been ported to a number
@ -120,6 +122,7 @@ This demo was tested in the following deployments:
| `darwin-x64` | `2.7.0` | 2023-07-24 |
| `darwin-arm` | `2.7.0` | 2023-06-05 |
| `win10-x64` | `2.7.0` | 2023-07-24 |
| `win11-arm` | `2.7.0` | 2023-09-26 |
| `linux-x64` | `2.7.0` | 2023-09-22 |
| `linux-arm` | `2.7.0` | 2023-08-30 |
@ -163,16 +166,42 @@ curl -LO https://docs.sheetjs.com/duk/sheetjs.duk.c
3) Compile standalone `sheetjs.duk` binary
<Tabs groupId="os">
<TabItem value="unix" label="Linux/MacOS">
```bash
gcc -std=c99 -Wall -osheetjs.duk sheetjs.duk.c duktape.c -lm
```
</TabItem>
<TabItem value="win" label="Windows">
```powershell
cl sheetjs.duk.c duktape.c /I .\
```
</TabItem>
</Tabs>
4) Run the demo:
<Tabs groupId="os">
<TabItem value="unix" label="Linux/MacOS">
```bash
./sheetjs.duk pres.numbers
```
</TabItem>
<TabItem value="win" label="Windows">
```bash
.\sheetjs.duk.exe pres.numbers
```
</TabItem>
</Tabs>
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 Excel.

View File

@ -128,6 +128,7 @@ This demo was tested in the following deployments:
| `11.8.82` | `darwin-arm` | macOS 13.5.1 | `clang 14.0.3` | 2023-08-26 |
| `11.8.82` | `win10-x64` | Windows 10 | `CL 19.37.32822` | 2023-08-26 |
| `11.8.82` | `linux-x64` | HoloOS 3.4.8 | `gcc 12.2.0` | 2023-08-26 |
| `11.8.82` | `linux-arm` | Debian 11 | `gcc 10.2.1` | 2023-09-26 |
:::
@ -435,7 +436,7 @@ fatal: cannot set up tracking information; starting point 'refs/tags/11.8.82' is
6) Build the static library.
<Tabs groupId="triple">
<TabItem value="darwin-x64" label="Intel Mac / Linux">
<TabItem value="darwin-x64" label="Intel Mac">
```bash
tools/dev/v8gen.py x64.release.sample
@ -443,11 +444,38 @@ ninja -C out.gn/x64.release.sample v8_monolith
```
</TabItem>
<TabItem value="darwin-arm" label="Apple Silicon">
<TabItem value="darwin-arm" label="ARM64 Mac">
```bash
tools/dev/v8gen.py arm64.release.sample
ninja -C out.gn/arm64.release.sample v8_monolith
```
</TabItem>
<TabItem value="linux-x64" label="Linux x64">
```bash
tools/dev/v8gen.py x64.release.sample
ninja -C out.gn/x64.release.sample v8_monolith
```
</TabItem>
<TabItem value="linux-arm" label="Linux ARM">
```bash
tools/dev/v8gen.py arm64.release.sample
```
Append the following line to `out.gn/arm64.release.sample/args.gn`:
```text title="out.gn/arm64.release.sample/args.gn (add to file)"
is_clang = false
```
Run the build:
```bash
ninja -C out.gn/arm64.release.sample v8_monolith
```
</TabItem>
@ -504,7 +532,7 @@ treat_warnings_as_errors = false
7) Ensure the sample `hello-world` compiles and runs:
<Tabs groupId="triple">
<TabItem value="darwin-x64" label="Intel Mac / Linux">
<TabItem value="darwin-x64" label="Intel Mac">
```bash
g++ -I. -Iinclude samples/hello-world.cc -o hello_world -fno-rtti -lv8_monolith \
@ -514,7 +542,27 @@ g++ -I. -Iinclude samples/hello-world.cc -o hello_world -fno-rtti -lv8_monolith
```
</TabItem>
<TabItem value="darwin-arm" label="Apple Silicon">
<TabItem value="darwin-arm" label="ARM64 Mac">
```bash
g++ -I. -Iinclude samples/hello-world.cc -o hello_world -fno-rtti -lv8_monolith \
-lv8_libbase -lv8_libplatform -ldl -Lout.gn/arm64.release.sample/obj/ -pthread \
-std=c++17 -DV8_COMPRESS_POINTERS=1 -DV8_ENABLE_SANDBOX
./hello_world
```
</TabItem>
<TabItem value="linux-x64" label="Linux x64">
```bash
g++ -I. -Iinclude samples/hello-world.cc -o hello_world -fno-rtti -lv8_monolith \
-lv8_libbase -lv8_libplatform -ldl -Lout.gn/x64.release.sample/obj/ -pthread \
-std=c++17 -DV8_COMPRESS_POINTERS=1 -DV8_ENABLE_SANDBOX
./hello_world
```
</TabItem>
<TabItem value="linux-arm" label="Linux ARM">
```bash
g++ -I. -Iinclude samples/hello-world.cc -o hello_world -fno-rtti -lv8_monolith \
@ -572,7 +620,7 @@ cp ~/dev/v8/v8/samples/hello-world.cc .
10) Create symbolic links to the `include` headers and `obj` library folders:
<Tabs groupId="triple">
<TabItem value="darwin-x64" label="Intel Mac / Linux">
<TabItem value="darwin-x64" label="Intel Mac">
```bash
ln -s ~/dev/v8/v8/include
@ -580,7 +628,23 @@ ln -s ~/dev/v8/v8/out.gn/x64.release.sample/obj
```
</TabItem>
<TabItem value="darwin-arm" label="Apple Silicon">
<TabItem value="darwin-arm" label="ARM64 Mac">
```bash
ln -s ~/dev/v8/v8/include
ln -s ~/dev/v8/v8/out.gn/arm64.release.sample/obj
```
</TabItem>
<TabItem value="linux-x64" label="Linux x64">
```bash
ln -s ~/dev/v8/v8/include
ln -s ~/dev/v8/v8/out.gn/x64.release.sample/obj
```
</TabItem>
<TabItem value="linux-arm" label="Linux ARM">
```bash
ln -s ~/dev/v8/v8/include

View File

@ -164,16 +164,17 @@ This demo was tested in the following deployments:
| Architecture | Jint Version | Date |
|:-------------|:------------------|:-----------|
| `darwin-x64` | `3.0.0-beta-2051` | 2023-09-16 |
| `darwin-arm` | `3.0.0-beta-2051` | 2023-09-26 |
| `win10-x64` | `3.0.0-beta-2051` | 2023-09-16 |
| `win11-arm` | `3.0.0-beta-2051` | 2023-09-26 |
| `linux-x64` | `3.0.0-beta-2051` | 2023-09-22 |
| `linux-arm` | `3.0.0-beta-2051` | 2023-09-26 |
:::
0) Install .NET[^5]
### Platform Configuration
1) Set the `DOTNET_CLI_TELEMETRY_OPTOUT` environment variable to `1`.
0) Set the `DOTNET_CLI_TELEMETRY_OPTOUT` environment variable to `1`.
<details open><summary><b>How to disable telemetry</b> (click to hide)</summary>
@ -206,6 +207,20 @@ Click "OK" in each window (3 windows) and restart your computer.
</details>
1) Install .NET
<details><summary><b>Installation Notes</b> (click to show)</summary>
For macOS x64 and ARM64, install with Homebrew: `brew install dotnet@6`
For Steam Deck Holo and other Arch Linux x64 distributions, the `dotnet-sdk` and
`dotnet-runtime` packages should be installed using `pacman`.
<https://dotnet.microsoft.com/en-us/download/dotnet/6.0> is the official source
for Windows and ARM64 Linux versions.
</details>
2) Open a new Terminal window in macOS or PowerShell window in Windows.
### Base Project
@ -213,7 +228,6 @@ Click "OK" in each window (3 windows) and restart your computer.
3) Create a new folder `SheetJSJint` and a new project using the `dotnet` tool:
```bash
rm -rf SheetJSJint
mkdir SheetJSJint
cd SheetJSJint
dotnet new console --framework net6.0
@ -331,14 +345,17 @@ If the `using Jint;` directive is omitted, the build will fail:
### Standalone Application
8) Find the runtime identifier (RID) for your platform[^6]. The RID values for
8) Find the runtime identifier (RID) for your platform[^5]. The RID values for
tested platforms are listed below:
| Platform | RID |
|:-----------------|:------------|
| Intel Mac | `osx-x64` |
| Windows 10 (x64) | `win10-x64` |
| Linux (x64) | `linux-x64` |
| Platform | RID |
|:-----------------|:--------------|
| Intel Mac | `osx-x64` |
| ARM64 Mac | `osx-arm64` |
| Windows 10 (x64) | `win10-x64` |
| Windows 11 (ARM) | `win-arm64` |
| Linux (x64) | `linux-x64` |
| Linux (ARM) | `linux-arm64` |
9) Build the standalone application. Replace `$RID` with the real value in:
@ -355,6 +372,15 @@ For Intel Mac, the RID is `osx-x64` and the command is
```bash
dotnet publish -c Release -r osx-x64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
```
</TabItem>
<TabItem value="darwin-arm" label="ARM64 Mac">
For Apple Silicon, the RID is `osx-arm64` and the command is
```bash
dotnet publish -c Release -r osx-arm64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
```
</TabItem>
@ -364,6 +390,15 @@ For x64 Linux, the RID is `linux-x64` and the command is
```bash
dotnet publish -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
```
</TabItem>
<TabItem value="linux-arm" label="Linux ARM">
For x64 Linux, the RID is `linux-arm64` and the command is
```bash
dotnet publish -c Release -r linux-arm64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
```
</TabItem>
@ -373,6 +408,15 @@ For Windows 10 x64, the RID is `win10-x64` and the command is:
```powershell
dotnet publish -c Release -r win10-x64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
```
</TabItem>
<TabItem value="win11-arm" label="Windows ARM">
For Windows 11 ARM64, the RID is `win-arm64` and the command is:
```powershell
dotnet publish -c Release -r win-arm64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
```
</TabItem>
@ -394,6 +438,15 @@ For Intel Mac, the RID is `osx-x64` and the command is:
```bash
cp bin/Release/net6.0/osx-x64/publish/SheetJSJint .
```
</TabItem>
<TabItem value="darwin-arm" label="ARM64 Mac">
For Apple Silicon, the RID is `osx-arm64` and the command is:
```bash
cp bin/Release/net6.0/osx-arm64/publish/SheetJSJint .
```
</TabItem>
@ -403,6 +456,15 @@ For x64 Linux, the RID is `linux-x64` and the command is
```bash
cp bin/Release/net6.0/linux-x64/publish/SheetJSJint .
```
</TabItem>
<TabItem value="linux-arm" label="Linux ARM">
For x64 Linux, the RID is `linux-arm64` and the command is
```bash
cp bin/Release/net6.0/linux-arm64/publish/SheetJSJint .
```
</TabItem>
@ -412,6 +474,15 @@ For Windows 10 x64, the RID is `win10-x64` and the command is:
```powershell
copy .\bin\Release\net6.0\win10-x64\publish\SheetJSJint.exe .
```
</TabItem>
<TabItem value="win11-arm" label="Windows ARM">
For Windows 11 ARM64, the RID is `win-arm64` and the command is:
```powershell
copy .\bin\Release\net6.0\win-arm64\publish\SheetJSJint.exe .
```
</TabItem>
@ -442,5 +513,4 @@ copy .\bin\Release\net6.0\win10-x64\publish\SheetJSJint.exe .
[^2]: See [`read` in "Reading Files"](/docs/api/parse-options)
[^3]: See [`write` in "Writing Files"](/docs/api/write-options)
[^4]: See ["Supported Output Formats" in "Writing Files"](/docs/api/write-options#supported-output-formats) for details on `bookType`
[^5]: At the time of writing, <https://dotnet.microsoft.com/en-us/download> is the official endpoint. For Steam Deck Holo and other Arch Linux distributions, the `dotnet-sdk` and `dotnet-runtime` packages should be installed using `pacman`.
[^6]: See [".NET RID Catalog"](https://learn.microsoft.com/en-us/dotnet/core/rid-catalog) in the .NET documentation
[^5]: See [".NET RID Catalog"](https://learn.microsoft.com/en-us/dotnet/core/rid-catalog) in the .NET documentation

View File

@ -97,7 +97,7 @@ This demo was tested in the following deployments:
| `darwin-x64` | `28ee0ee` | `1.19.3` | 2023-06-05 |
| `darwin-arm` | `28ee0ee` | `1.20.4` | 2023-06-05 |
| `win10-x64` | `81d7606` | `1.20.2` | 2023-08-27 |
| `win10-arm` | `fc55792` | `1.21.1` | 2023-09-25 |
| `win11-arm` | `fc55792` | `1.21.1` | 2023-09-25 |
| `linux-x64` | `81d7606` | `1.21.0` | 2023-08-27 |
| `linux-arm` | `3dbe69d` | `1.21.1` | 2023-08-30 |

View File

@ -137,7 +137,7 @@ brew install icu4c cmake
```
</TabItem>
<TabItem value="darwin-arm" label="Apple Silicon">
<TabItem value="darwin-arm" label="ARM64 Mac">
```bash
brew install icu4c cmake
@ -201,7 +201,7 @@ cd ..
:::
</TabItem>
<TabItem value="darwin-arm" label="Apple Silicon">
<TabItem value="darwin-arm" label="ARM64 Mac">
:::info pass

View File

@ -117,6 +117,7 @@ This demo was tested in the following deployments:
| `darwin-x64` | 2023-08-31 |
| `darwin-arm` | 2023-07-05 |
| `win10-x64` | 2023-08-31 |
| `win11-arm` | 2023-09-26 |
| `linux-x64` | 2023-07-05 |
| `linux-arm` | 2023-08-30 |

View File

@ -78,20 +78,7 @@ further detail.
Browsers have strict memory limits and large spreadsheets can exceed the limits.
<details><summary><b>Technical Limitations</b> (click to show)</summary>
V8 (Node/Chrome) have a maximum string length that has changed over the years.
Node 16 and Chrome 106 enforce a limit of 536870888 characters. This issue will
manifest with error messages such as `Invalid string length`.
There are memory bottlenecks associated with string addresses. A number of bugs
have been reported to the V8 and Chromium projects on this subject. While those
bugs are being resolved, for sheets containing hundreds of thousands of rows,
dense mode worksheets should be used.
</details>
The API functions support [dense mode](/docs/csf/sheet#dense-mode):
For large worksheets, use [dense worksheets](/docs/csf/sheet#dense-mode):
```js
var wb = XLSX.read(data, {dense: true}); // creates a dense-mode sheet
@ -103,6 +90,48 @@ server with NodeJS or some other server-side technology.
If the files are small, please [report to our issue tracker](https://git.sheetjs.com/sheetjs/sheetjs/issues)
:::info pass
Sparse worksheets historically were more performant in small sheets. Due to a
[2014 bug in V8](https://bugs.chromium.org/p/v8/issues/detail?id=3175) and a
[2017 regression in V8](https://bugs.chromium.org/p/v8/issues/detail?id=6696)
(the JavaScript engine powering Node and Chrome), large sparse worksheets will
crash the web browser.
:::
#### "Invalid String Length" or ERR_STRING_TOO_LONG
V8 (Node/Chrome) have a maximum string length that has changed over the years.
Node 16 and Chrome 106 enforce a limit of `0x1fffffe8` (536870888) characters.
[A 2017 V8 discussion](https://bugs.chromium.org/p/v8/issues/detail?id=6148)
explains some of the background behind the V8 decision.
XLSX and ODS are ZIP-based formats that store worksheets in XML entries. In
worksheets with over 100M cells, the XML strings may exceed the V8 limit!
Depending on the environment, this issue may result in missing worksheets; error
messages such as `Invalid string length`, `ERR_STRING_TOO_LONG`, or
`Cannot create a string longer than 0x1fffffe8 characters`; or browser crashes.
A number of bugs have been reported to the V8 and Chromium projects on this
subject, some of which have been open for nearly a decade.
Please [leave a note](https://git.sheetjs.com/sheetjs/sheetjs/issues) including
worksheet sizes (number of rows/columns and file size) and environment (browser
or NodeJS or other platform).
:::tip pass
The "Excel Binary Workbook" XLSB format uses a binary representation. The XLSB
parser is not affected by this issue.
XLSB files are typically smaller than equivalent XLSX files. There are other
Excel performance benefits to XLSB, so it is strongly recommended to use XLSB
when possible.
:::
#### Invalid HTML: could not find table
Data can be fetched and parsed by the library: