Knuth fixed the error
This commit is contained in:
parent
b379b40145
commit
f48835d420
@ -752,6 +752,10 @@ van Reeken[^13] reported success with the algorithm presented in this section.
|
||||
|
||||
Knuth[^14] erroneously attributed this implementation of the mean to Welford.
|
||||
|
||||
**The error in "Seminumerical Algorithms" (TAOCP Volume 2) was addressed!**[^15]
|
||||
|
||||
A SheetJS teammate has received a Knuth Reward Check for the contribution.
|
||||
|
||||
:::
|
||||
|
||||
[^1]: See [`sheet_to_json` in "Utilities"](/docs/api/utilities/array#array-output)
|
||||
@ -768,3 +772,4 @@ Knuth[^14] erroneously attributed this implementation of the mean to Welford.
|
||||
[^12]: See "Comparison of Several Algorithms for Computation of Means, Standard Deviations and Correlation Coefficients" in CACM Vol 9 No 7 (1966 July).
|
||||
[^13]: See "Dealing with Neely's Algorithms" in CACM Vol 11 No 3 (1968 March).
|
||||
[^14]: See "The Art of Computer Programming: Seminumerical Algorithms" Third Edition page 232.
|
||||
[^15]: See the ["Errata for Volume 2 (after 2021)" in the TAOCP site](https://www-cs-faculty.stanford.edu/~knuth/taocp.html)
|
||||
|
@ -326,6 +326,18 @@ Binary strings are the favored data type. They can be safely passed from the
|
||||
browser context to the automation script. PhantomJS provides an API to write
|
||||
binary strings to file (`fs.write` using mode `wb`).
|
||||
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was tested in the following environments:
|
||||
|
||||
| Architecture | PhantomJS | Date |
|
||||
|:-------------|:----------|:-----------|
|
||||
| `darwin-x64` | `2.1.1` | 2024-12-17 |
|
||||
| `win11-x64` | `2.1.1` | 2025-01-19 |
|
||||
| `linux-x64` | `2.1.1` | 2025-01-07 |
|
||||
|
||||
:::
|
||||
|
||||
<details>
|
||||
<summary><b>Integration Details and Demo</b> (click to show)</summary>
|
||||
|
||||
@ -371,18 +383,6 @@ strongly recommended to add verbose logging and to lint scripts before use.
|
||||
|
||||
**Demo**
|
||||
|
||||
:::note Tested Deployments
|
||||
|
||||
This demo was tested in the following environments:
|
||||
|
||||
| Architecture | PhantomJS | Date |
|
||||
|:-------------|:----------|:-----------|
|
||||
| `darwin-x64` | `2.1.1` | 2024-12-17 |
|
||||
| `win11-x64` | `2.1.1` | 2024-05-22 |
|
||||
| `linux-x64` | `2.1.1` | 2025-01-07 |
|
||||
|
||||
:::
|
||||
|
||||
1) [Download and extract PhantomJS](https://phantomjs.org/download.html)
|
||||
|
||||
2) Save the `SheetJSPhantom.js` code snippet to `SheetJSPhantom.js`.
|
||||
|
@ -53,12 +53,24 @@ overridden through a `package.json` override in the latest versions of NodeJS:
|
||||
|
||||
:::danger Telemetry
|
||||
|
||||
GatsbyJS collects telemetry by default. The `telemetry` subcommand can disable it:
|
||||
Older versions of GatsbyJS collect telemetry by default. The `telemetry`
|
||||
subcommand can disable telemetry:
|
||||
|
||||
```js
|
||||
npx gatsby telemetry --disable
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
GatsbyJS `5.14.1` does not transmit telemetry:
|
||||
|
||||
```text title="Expected output in GatsbyJS 5.14.1"
|
||||
Telemetry is no longer gathered and is always disabled
|
||||
```
|
||||
|
||||
It is still strongly encouraged to disable telemetry since older projects may
|
||||
use a GatsbyJS version that embeds telemetry.
|
||||
|
||||
:::
|
||||
|
||||
## Integration Details
|
||||
@ -179,7 +191,7 @@ This demo was tested in the following environments:
|
||||
|
||||
| GatsbyJS | Date |
|
||||
|:---------|:-----------|
|
||||
| `5.13.4` | 2024-05-04 |
|
||||
| `5.14.1` | 2025-01-19 |
|
||||
| `4.25.8` | 2025-01-02 |
|
||||
|
||||
:::
|
||||
@ -433,8 +445,10 @@ const PageComponent = ({data}) => {
|
||||
export default PageComponent;
|
||||
```
|
||||
|
||||
11) After saving the file, access `http://localhost:8000/pres` in the browser.
|
||||
The displayed JSON is the data that the component receives:
|
||||
Save the file.
|
||||
|
||||
11) Access the `/pres` page (typically `http://localhost:8000/pres` ) in a web
|
||||
browser. The displayed JSON is the data that the component receives:
|
||||
|
||||
```js title="Expected contents of /pres"
|
||||
{
|
||||
@ -509,13 +523,6 @@ npm run build
|
||||
The build output will confirm that the `/pres` route is static:
|
||||
|
||||
```text title="Output from GatsbyJS build process"
|
||||
Pages
|
||||
|
||||
┌ src/pages/404.js
|
||||
│ ├ /404/
|
||||
│ └ /404.html
|
||||
├ src/pages/index.js
|
||||
│ └ /
|
||||
└ src/pages/pres.js
|
||||
└ /pres/
|
||||
|
||||
|
@ -44,15 +44,15 @@ This demo was tested in the following environments:
|
||||
|
||||
| OS | Device | CapacitorJS + FS | Date |
|
||||
|:-----------|:--------------------|:------------------|:-----------|
|
||||
| Android 30 | NVIDIA Shield | `6.0.0` / `6.0.0` | 2024-06-02 |
|
||||
| iOS 15.1 | iPad Pro | `6.0.0` / `6.0.0` | 2024-06-02 |
|
||||
| Android 30 | NVIDIA Shield | `6.2.0` / `6.0.3` | 2025-01-19 |
|
||||
| iOS 15.1 | iPad Pro | `6.2.0` / `6.0.3` | 2025-01-19 |
|
||||
|
||||
**Simulators**
|
||||
|
||||
| OS | Device | CapacitorJS + FS | Dev Platform | Date |
|
||||
|:-----------|:--------------------|:------------------|:-------------|:-----------|
|
||||
| Android 34 | Pixel 3a | `6.0.0` / `6.0.0` | `darwin-x64` | 2024-06-02 |
|
||||
| iOS 17.5 | iPhone 15 Pro Max | `6.0.0` / `6.0.0` | `darwin-x64` | 2024-06-02 |
|
||||
| Android 35 | Pixel 9 Pro | `6.2.0` / `6.0.3` | `darwin-x64` | 2025-01-19 |
|
||||
| iOS 18.2 | iPhone 16 Pro Max | `6.2.0` / `6.0.3` | `darwin-x64` | 2025-01-19 |
|
||||
| Android 34 | Pixel 3a | `6.0.0` / `6.0.0` | `darwin-arm` | 2024-06-02 |
|
||||
| iOS 17.5 | iPhone 15 Pro Max | `6.0.0` / `6.0.0` | `darwin-arm` | 2024-06-02 |
|
||||
| Android 35 | Pixel 9 | `6.2.0` / `6.0.2` | `win11-x64` | 2024-12-21 |
|
||||
@ -217,7 +217,9 @@ iOS development is only supported on macOS.
|
||||
<details>
|
||||
<summary><b>Installation Notes</b> (click to show)</summary>
|
||||
|
||||
CapacitorJS requires Java 17.
|
||||
For Android development, CapacitorJS requires a Java version compatible with the
|
||||
expected Gradle version. When this demo was tested against CapacitorJS `6.2.0`,
|
||||
Java 20 was required to support Gradle `8.2.1`.
|
||||
|
||||
</details>
|
||||
|
||||
@ -277,6 +279,20 @@ npm i --save @capacitor/android
|
||||
npx cap add android
|
||||
```
|
||||
|
||||
:::caution pass
|
||||
|
||||
If the wrong Java version is installed, the last command will fail with a
|
||||
message that references a "class file major version"
|
||||
|
||||
```
|
||||
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 67
|
||||
```
|
||||
|
||||
The correct Java version must be installed. When this demo was last tested, Java
|
||||
20 was compatible with CapacitorJS Android projects.
|
||||
|
||||
:::
|
||||
|
||||
7) Enable file reading and writing in the Android app.
|
||||
|
||||
Add the highlighted lines to `android/app/src/main/AndroidManifest.xml` after
|
||||
@ -293,7 +309,9 @@ the `Permissions` comment:
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
```
|
||||
|
||||
8) Run the app in the simulator:
|
||||
8) Start the Android simulator through Android Studio.
|
||||
|
||||
9) Run the app in the simulator:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
@ -303,10 +321,12 @@ npx cap run android
|
||||
|
||||
The app should look like the screenshot at the top of the page.
|
||||
|
||||
9) Test the export functionality.
|
||||
10) Test the export functionality.
|
||||
|
||||
Touch "Export XLSX" and the emulator will ask for permission. Tap "Allow" and a
|
||||
popup will be displayed with a path.
|
||||
Touch "Export XLSX". If the emulator asks for permission, tap "Allow". A popup
|
||||
will show the exported path.
|
||||
|
||||
![Export Confirmation Popup](pathname:///cap/and-export-popup.png)
|
||||
|
||||
Open the "Files" app in the simulator, tap the `≡` icon and tap "Documents". Tap
|
||||
the "Documents" folder to find `SheetJSCap.xlsx`.
|
||||
@ -338,25 +358,27 @@ adb pull "/storage/emulated/0/Documents/SheetJSCap.xlsx" SheetJSCap.xlsx
|
||||
|
||||
</details>
|
||||
|
||||
10) Test the import functionality.
|
||||
11) Test the import functionality.
|
||||
|
||||
Create a spreadsheet or find an existing file. Click and drag the file into the
|
||||
Android emulator window. The file will be uploaded to a Downloads folder in the
|
||||
emulator.
|
||||
Edit `SheetJSCap.xlsx`, setting cell `A7` to `SheetJS Dev` and setting cell `B7`
|
||||
to `47`. Save the file.
|
||||
|
||||
Tap on "Choose File" in the app. In the selector, tap `≡` and select "Downloads"
|
||||
to find the uploaded file. After selecting the file, the table will refresh.
|
||||
Click and drag the file into the Android emulator window. The file will be
|
||||
uploaded to a Downloads folder in the emulator.
|
||||
|
||||
Switch back to the app and tap "Choose File". In the selector, tap `≡`, select
|
||||
"Downloads" and tap `SheetJSCap.xlsx`. The table will refresh with the new row.
|
||||
|
||||
### iOS
|
||||
|
||||
11) Create iOS app
|
||||
12) Create iOS app.
|
||||
|
||||
```bash
|
||||
npm i --save @capacitor/ios
|
||||
npx cap add ios
|
||||
```
|
||||
|
||||
12) Enable file sharing and make the documents folder visible in the iOS app.
|
||||
13) Enable file sharing and make the documents folder visible in the iOS app.
|
||||
The following lines must be added to `ios/App/App/Info.plist`:
|
||||
|
||||
```xml title="ios/App/App/Info.plist (add to file)"
|
||||
@ -373,7 +395,7 @@ The following lines must be added to `ios/App/App/Info.plist`:
|
||||
|
||||
(The root element of the document is `plist` and it contains one `dict` child)
|
||||
|
||||
13) Run the app in the simulator
|
||||
14) Run the app in the simulator.
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
@ -381,14 +403,16 @@ npx cap sync
|
||||
npx cap run ios
|
||||
```
|
||||
|
||||
If prompted to select a target device, select "iPhone 15 Pro Max (simulator)".
|
||||
If prompted to select a target device, select "iPhone 16 Pro Max (simulator)".
|
||||
|
||||
The app should look like the screenshot at the top of the page.
|
||||
|
||||
14) Test the export functionality.
|
||||
15) Test the export functionality.
|
||||
|
||||
Touch "Export XLSX" and a popup will be displayed.
|
||||
|
||||
![Export Confirmation Popup](pathname:///cap/ios-export-popup.png)
|
||||
|
||||
To see the generated file, switch to the "Files" app in the simulator and look
|
||||
for `SheetJSCap.xlsx` in "On My iPhone" > "`sheetjs-cap`"
|
||||
|
||||
@ -404,24 +428,42 @@ find ~/Library/Developer -name SheetJSCap.xlsx
|
||||
|
||||
</details>
|
||||
|
||||
15) Test the import functionality.
|
||||
16) Test the import functionality.
|
||||
|
||||
Create a spreadsheet or find an existing file. Click and drag the file into the
|
||||
iOS simulator window. The simulator will show a picker for saving the file.
|
||||
Select the `sheetjs-cap` folder and tap "Save".
|
||||
Edit `SheetJSCap.xlsx`, setting cell `A7` to `SheetJS Dev` and setting cell `B7`
|
||||
to `47`. Save the file.
|
||||
|
||||
Click and drag the file into the iOS simulator window. The simulator will show a
|
||||
picker for saving the file. Select the `sheetjs-cap` folder and tap "Save". If
|
||||
prompted to "Replace Existing Items?", tap "Replace".
|
||||
|
||||
Switch back to the app and tap "Choose File". Tap "Choose File" in the popup.
|
||||
|
||||
Tap on "Choose File" in the app and "Choose File" in the popup. In the picker,
|
||||
tap "Recents" and select the new file. After selecting the file, the table will refresh.
|
||||
tap "Recents" and select the newest `SheetJSCap` file. The table will refresh.
|
||||
|
||||
### Android Device
|
||||
|
||||
16) Connect an Android device using a USB cable.
|
||||
17) Connect an Android device using a USB cable.
|
||||
|
||||
If the device asks to allow USB debugging, tap "Allow".
|
||||
|
||||
17) Close any Android / iOS emulators.
|
||||
18) Confirm the device is detected by `adb`.
|
||||
|
||||
18) Build APK and run on device:
|
||||
```bash
|
||||
adb devices
|
||||
```
|
||||
|
||||
If the device is detected, the command will list the device:
|
||||
|
||||
```text title="Expected output"
|
||||
List of devices attached
|
||||
1234567890 device
|
||||
```
|
||||
|
||||
19) Close any Android / iOS emulators.
|
||||
|
||||
20) Build APK and run on device:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
@ -460,17 +502,19 @@ to the `application` open tag in `android/app/src/main/AndroidManifest.xml`:
|
||||
|
||||
### iOS Device
|
||||
|
||||
19) Connect an iOS device using a USB cable
|
||||
21) Connect an iOS device using a USB cable
|
||||
|
||||
20) Close any Android / iOS emulators.
|
||||
If prompted to "Trust This Computer", tap "Trust" and enter the device passcode.
|
||||
|
||||
21) Enable developer code signing certificates.
|
||||
22) Close any Android / iOS emulators.
|
||||
|
||||
23) Enable developer code signing certificates.
|
||||
|
||||
Open `ios/App/App.xcworkspace` in Xcode. Select the "Project Navigator" and
|
||||
select the "App" project. In the main view, select "Signing & Capabilities".
|
||||
Under "Signing", select a team in the dropdown menu.
|
||||
|
||||
22) Run on device:
|
||||
24) Run on device:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
@ -480,6 +524,35 @@ npx cap run ios
|
||||
|
||||
When prompted to select a target device, select the real device in the list.
|
||||
|
||||
:::info pass
|
||||
|
||||
In some test runs, the build failed with a provisioning error:
|
||||
|
||||
```
|
||||
error: Provisioning profile "iOS Team Provisioning Profile: com.sheetjs.cap" doesn't include the currently selected device "SheetJS Test Device" (identifier 12345678-9ABCDEF012345678). (in target 'App' from project 'App')
|
||||
```
|
||||
|
||||
This error was resolved by manually selecting the device as the primary target
|
||||
in the Xcode workspace.
|
||||
|
||||
:::
|
||||
|
||||
:::caution pass
|
||||
|
||||
In some tests, the app failed to launch with a "Untrusted Developer" error.
|
||||
|
||||
Switch to the Settings app and select General > VPN & Device Management. There
|
||||
will be a new item in the "DEVELOPER APP" section. Tap the line and verify that
|
||||
`sheetjs-cap` is listed in the screen. Tap "Trust" and tap "Trust" in the popup.
|
||||
|
||||
After trusting the certificate, re-run the app:
|
||||
|
||||
```bash
|
||||
npx cap run ios
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
[^1]: See [`read` in "Reading Files"](/docs/api/parse-options)
|
||||
[^2]: See [`sheet_to_html` in "Utilities"](/docs/api/utilities/html#html-table-output)
|
||||
[^3]: See ["Workbook Object"](/docs/csf/book)
|
||||
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
title: Electron
|
||||
title: Electrified Sheets with Electron
|
||||
sidebar_label: Electron
|
||||
pagination_prev: demos/mobile/index
|
||||
pagination_next: demos/cli/index
|
||||
sidebar_position: 1
|
||||
@ -10,10 +11,14 @@ sidebar_custom_props:
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
The [NodeJS Module](/docs/getting-started/installation/nodejs) can be imported
|
||||
from the main or the renderer thread.
|
||||
[Electron](https://www.electronjs.org/) is a modern toolkit for building desktop
|
||||
apps. Electron apps use the same technologies powering Chromium and NodeJS.
|
||||
|
||||
The "Complete Example" creates an app that looks like the screenshots below:
|
||||
[SheetJS](https://sheetjs.com) is a JavaScript library for reading and writing
|
||||
data from spreadsheets.
|
||||
|
||||
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">Windows</a></th>
|
||||
@ -35,8 +40,22 @@ The "Complete Example" creates an app that looks like the screenshots below:
|
||||
|
||||
## Integration Details
|
||||
|
||||
Electron presents a `fs` module. The `require('xlsx')` call loads the CommonJS
|
||||
module, so `XLSX.readFile` and `XLSX.writeFile` work in the renderer thread.
|
||||
The [SheetJS NodeJS Module](/docs/getting-started/installation/nodejs) can be
|
||||
imported from the main or the renderer thread.
|
||||
|
||||
The SheetJS `readFile` and `writeFile` methods will use the Electron `fs` module
|
||||
where available.
|
||||
|
||||
<details>
|
||||
<summary><b>Renderer Configuration</b> (click to show)</summary>
|
||||
|
||||
Electron 9 and later require the preference `nodeIntegration: true` in order to
|
||||
`require('xlsx')` in the renderer process.
|
||||
|
||||
Electron 12 and later also require `worldSafeExecuteJavascript: true` and
|
||||
`contextIsolation: true`.
|
||||
|
||||
</details>
|
||||
|
||||
### Reading Files
|
||||
|
||||
@ -190,7 +209,7 @@ This demo was tested in the following environments:
|
||||
|:---------------|:-------------|:---------|:-----------|
|
||||
| macOS 15.2 | `darwin-x64` | `33.2.1` | 2024-12-31 |
|
||||
| macOS 14.5 | `darwin-arm` | `30.0.8` | 2024-05-28 |
|
||||
| Windows 11 | `win11-x64` | `31.2.0` | 2024-08-18 |
|
||||
| Windows 11 | `win11-x64` | `33.2.1` | 2025-01-19 |
|
||||
| Windows 11 | `win11-arm` | `30.0.8` | 2024-05-28 |
|
||||
| Linux (HoloOS) | `linux-x64` | `33.2.1` | 2025-01-02 |
|
||||
| Linux (Debian) | `linux-arm` | `30.0.8` | 2024-05-28 |
|
||||
@ -231,6 +250,26 @@ curl -LO https://docs.sheetjs.com/electron/index.html
|
||||
curl -LO https://docs.sheetjs.com/electron/index.js
|
||||
```
|
||||
|
||||
:::note pass
|
||||
|
||||
In PowerShell, the command may fail with a parameter error:
|
||||
|
||||
```
|
||||
Invoke-WebRequest : A parameter cannot be found that matches parameter name 'LO'.
|
||||
```
|
||||
|
||||
`curl.exe` must be invoked directly:
|
||||
|
||||
```bash
|
||||
curl.exe -LO https://docs.sheetjs.com/electron/package.json
|
||||
curl.exe -LO https://docs.sheetjs.com/electron/main.js
|
||||
curl.exe -LO https://docs.sheetjs.com/electron/index.html
|
||||
curl.exe -LO https://docs.sheetjs.com/electron/index.js
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
|
||||
2) Install dependencies:
|
||||
|
||||
```bash
|
||||
|
@ -37,7 +37,7 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Version | NodeJS | Source | Date |
|
||||
|:-------------|:-------------|:----------|:----------|:-----------|
|
||||
| `darwin-x64` | `4.0.0-rc.6` | `14.15.3` | Pre-built | 2024-05-28 |
|
||||
| `darwin-x64` | `4.0.0-rc.6` | `14.15.3` | Pre-built | 2025-01-19 |
|
||||
| `darwin-arm` | `4.0.0-rc.6` | `18.20.3` | Compiled | 2024-05-25 |
|
||||
| `win11-x64` | `4.0.0-rc.6` | `14.15.3` | Pre-built | 2024-12-19 |
|
||||
| `win11-arm` | `4.0.0-rc.6` | `20.10.0` | Compiled | 2024-05-28 |
|
||||
|
@ -37,7 +37,7 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Version | NodeJS | Date |
|
||||
|:-------------|:--------|:---------|:-----------|
|
||||
| `darwin-x64` | `5.8.1` | `18.5.0` | 2024-05-28 |
|
||||
| `darwin-x64` | `5.8.1` | `18.5.0` | 2025-01-19 |
|
||||
| `darwin-arm` | `5.8.1` | `18.5.0` | 2024-05-25 |
|
||||
| `win11-x64` | `5.8.1` | `18.5.0` | 2024-12-19 |
|
||||
| `win11-arm` | `5.8.1` | `18.5.0` | 2024-10-25 |
|
||||
|
@ -30,7 +30,7 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Version | NodeJS | Date |
|
||||
|:-------------|:--------|:----------|:-----------|
|
||||
| `darwin-x64` | `2.4.0` | `22.2.0` | 2024-05-28 |
|
||||
| `darwin-x64` | `2.4.4` | `23.6.0` | 2025-01-19 |
|
||||
| `darwin-arm` | `2.4.3` | `22.2.0` | 2024-05-25 |
|
||||
| `win11-x64` | `2.4.4` | `16.20.2` | 2024-12-19 |
|
||||
| `linux-x64` | `2.4.4` | `23.5.0` | 2024-12-31 |
|
||||
|
@ -158,9 +158,9 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | NodeJS | Date |
|
||||
|:-------------|:----------|:-----------|
|
||||
| `darwin-x64` | `22.2.0` | 2024-05-28 |
|
||||
| `darwin-x64` | `22.13.0` | 2025-01-19 |
|
||||
| `darwin-arm` | `22.2.0` | 2024-05-29 |
|
||||
| `win11-x64` | `20.13.1` | 2024-05-22 |
|
||||
| `win11-x64` | `22.13.0` | 2025-01-19 |
|
||||
| `win11-arm` | `20.14.0` | 2024-06-11 |
|
||||
| `linux-x64` | `22.12.0` | 2025-01-02 |
|
||||
| `linux-arm` | `20.14.0` | 2024-06-10 |
|
||||
@ -313,6 +313,9 @@ signtool remove /s .\sheet2csv.exe
|
||||
|
||||
`signtool` is included in the Windows SDK[^4].
|
||||
|
||||
If the Windows SDK is installed but the command fails, run the comand in the
|
||||
"x64 Native Tools Command Prompt" that ships with Visual Studio.
|
||||
|
||||
:::
|
||||
|
||||
</TabItem>
|
||||
@ -351,7 +354,7 @@ npx -y postject --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 s
|
||||
|
||||
11) Resign the binary.
|
||||
|
||||
The following sequence generates a self-signed certificate:
|
||||
The following PowerShell commands generate a self-signed certificate:
|
||||
|
||||
```powershell
|
||||
$cert = New-SelfSignedCertificate -Type CodeSigning -DnsName www.onlyspans.net -CertStoreLocation Cert:\CurrentUser\My
|
||||
@ -365,6 +368,15 @@ After creating a cert, sign the binary:
|
||||
signtool sign /v /f mycert.pfx /p hunter2 /fd SHA256 sheet2csv.exe
|
||||
```
|
||||
|
||||
:::info pass
|
||||
|
||||
`signtool` is included in the Windows SDK[^4].
|
||||
|
||||
If the Windows SDK is installed but the command fails, run the comand in the
|
||||
"x64 Native Tools Command Prompt" that ships with Visual Studio.
|
||||
|
||||
:::
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="linux-x64" label="Linux">
|
||||
|
||||
@ -412,6 +424,15 @@ Signature=adhoc
|
||||
signtool verify sheet2csv.exe
|
||||
```
|
||||
|
||||
:::info pass
|
||||
|
||||
`signtool` is included in the Windows SDK[^4].
|
||||
|
||||
If the Windows SDK is installed but the command fails, run the comand in the
|
||||
"x64 Native Tools Command Prompt" that ships with Visual Studio.
|
||||
|
||||
:::
|
||||
|
||||
If the certificate is self-signed, there may be an error:
|
||||
|
||||
```
|
||||
|
@ -79,7 +79,7 @@ This demo was last tested in the following deployments:
|
||||
|
||||
| Architecture | BunJS | Date |
|
||||
|:-------------|:---------|:-----------|
|
||||
| `darwin-x64` | `1.1.10` | 2024-05-28 |
|
||||
| `darwin-x64` | `1.1.45` | 2025-01-19 |
|
||||
| `darwin-arm` | `1.1.40` | 2024-12-19 |
|
||||
| `win11-x64` | `1.1.40` | 2024-12-19 |
|
||||
| `win11-arm` | `1.1.33` | 2024-10-25 |
|
||||
|
@ -99,9 +99,9 @@ This demo was last tested in the following deployments:
|
||||
|
||||
| Architecture | Deno | Date |
|
||||
|:-------------|:---------|:-----------|
|
||||
| `darwin-x64` | `1.43.6` | 2024-05-28 |
|
||||
| `darwin-x64` | `2.1.6` | 2025-01-19 |
|
||||
| `darwin-arm` | `1.43.6` | 2024-05-23 |
|
||||
| `win11-x64` | `1.43.6` | 2024-05-25 |
|
||||
| `win11-x64` | `2.1.6` | 2025-01-19 |
|
||||
| `win11-arm` | `2.0.3` | 2024-10-25 |
|
||||
| `linux-x64` | `2.1.4` | 2025-01-02 |
|
||||
| `linux-arm` | `1.43.6` | 2024-05-25 |
|
||||
@ -150,26 +150,30 @@ deno run -r --allow-read --allow-import https://docs.sheetjs.com/cli/sheet2csv.t
|
||||
|
||||
:::
|
||||
|
||||
3) Compile and run `sheet2csv`:
|
||||
3) Compile `sheet2csv`:
|
||||
|
||||
```bash
|
||||
deno compile -r --allow-read https://docs.sheetjs.com/cli/sheet2csv.ts
|
||||
./sheet2csv pres.numbers
|
||||
```
|
||||
|
||||
The program should display the same CSV contents as the script (from step 2)
|
||||
|
||||
:::info pass
|
||||
|
||||
In newer versions of Deno, importing from a URL requires import permissions:
|
||||
|
||||
```bash
|
||||
deno compile -r --allow-read --allow-import https://docs.sheetjs.com/cli/sheet2csv.ts
|
||||
./sheet2csv pres.numbers
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
4) Run the command:
|
||||
|
||||
```bash
|
||||
./sheet2csv pres.numbers
|
||||
```
|
||||
|
||||
The program should display the same CSV contents as the script (from step 2).
|
||||
|
||||
[^1]: See [`readFile` in "Reading Files"](/docs/api/parse-options)
|
||||
[^2]: See [`sheet_to_csv` in "CSV and Text"](/docs/api/utilities/csv#delimiter-separated-output)
|
||||
[^3]: See [`readFile` in "Reading Files"](/docs/api/parse-options)
|
||||
|
@ -34,9 +34,9 @@ against SQL injection and other vulnerabilities.
|
||||
|
||||
This demo was tested in the following environments:
|
||||
|
||||
| MariaDB | Connector Library | Date |
|
||||
|:---------|:-------------------|:-----------|
|
||||
| `11.3.2` | `mysql2` (`3.9.7`) | 2024-05-04 |
|
||||
| MariaDB | Connector Library | Date |
|
||||
|:---------|:--------------------|:-----------|
|
||||
| `11.6.2` | `mysql2` (`3.12.0`) | 2025-01-19 |
|
||||
|
||||
:::
|
||||
|
||||
|
@ -28,8 +28,9 @@ This demo was tested in the following environments:
|
||||
| Server | Connector Library | Date |
|
||||
|:--------------------|:---------------------|:-----------|
|
||||
| FerretDB `1.24.0` | `mongodb` (`6.12.0`) | 2025-01-03 |
|
||||
| MongoDB CE `6.0.15` | `mongodb` (`6.5.0`) | 2024-05-01 |
|
||||
| MongoDB CE `7.0.8` | `mongodb` (`6.5.0`) | 2024-05-01 |
|
||||
| MongoDB CE `8.0.4` | `mongodb` (`6.12.0`) | 2025-01-19 |
|
||||
| MongoDB CE `7.0.16` | `mongodb` (`6.12.0`) | 2025-01-19 |
|
||||
| MongoDB CE `6.0.20` | `mongodb` (`6.5.0`) | 2025-01-19 |
|
||||
|
||||
:::
|
||||
|
||||
@ -91,7 +92,7 @@ FerretDB[^10]
|
||||
<details>
|
||||
<summary><b>MongoDB CE Setup</b> (click to show)</summary>
|
||||
|
||||
For MongoDB 7.0 Community Edition, the macOS steps required `brew`:
|
||||
For MongoDB 8.0 Community Edition, the macOS steps required `brew`:
|
||||
|
||||
```bash
|
||||
brew tap mongodb/brew
|
||||
@ -102,26 +103,16 @@ brew install mongodb-community
|
||||
Older versions can be installed by passing the version major and minor numbers:
|
||||
|
||||
```bash
|
||||
# Install 6.0
|
||||
brew install mongodb-community@6.0
|
||||
# Install 7.0
|
||||
brew install mongodb-community@7.0
|
||||
```
|
||||
|
||||
:::note pass
|
||||
|
||||
If `brew` was used to install MongoDB, the following command starts a server:
|
||||
|
||||
```bash
|
||||
/usr/local/opt/mongodb-community/bin/mongod --config /usr/local/etc/mongod.conf
|
||||
$(brew --prefix)/opt/mongodb-community/bin/mongod --config $(brew --prefix)/etc/mongod.conf
|
||||
```
|
||||
|
||||
If Homebrew is configured to use `/opt/homebrew`, the command is:
|
||||
|
||||
```bash
|
||||
/opt/homebrew/opt/mongodb-community/bin/mongod --config /opt/homebrew/etc/mongod.conf
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
@ -137,16 +128,16 @@ brew install colima docker docker-compose
|
||||
To properly install `docker-compose`, the `colima` process must be run once:
|
||||
|
||||
```bash
|
||||
/opt/homebrew/opt/colima/bin/colima start -f
|
||||
$(brew --prefix)/opt/colima/bin/colima start -f
|
||||
```
|
||||
|
||||
After stopping the process, delete any containers:
|
||||
|
||||
```bash
|
||||
/opt/homebrew/opt/colima/bin/colima delete
|
||||
$(brew --prefix)/opt/colima/bin/colima delete
|
||||
```
|
||||
|
||||
`config.json` must be edited:
|
||||
`config.json` must be edited:
|
||||
|
||||
- Homebrew docker plugins folder must be added to `cliPluginsExtraDirs`.
|
||||
- All `credsStore` settings must be removed.
|
||||
@ -165,10 +156,21 @@ When the demo was last tested, the following `config.json` was used:
|
||||
}
|
||||
```
|
||||
|
||||
After making the changes, start `colima` again and keep the window open:
|
||||
:::note pass
|
||||
|
||||
The `/opt/homebrew` part of the path must be replaced with the Homebrew prefix.
|
||||
The following command displays the prefix:
|
||||
|
||||
```bash
|
||||
/opt/homebrew/opt/colima/bin/colima start -f
|
||||
brew --prefix
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
After making the change, start `colima` again and keep the window open:
|
||||
|
||||
```bash
|
||||
$(brew --prefix)/opt/colima/bin/colima start -f
|
||||
```
|
||||
|
||||
Start the FerretDB server in a new terminal window:
|
||||
@ -200,7 +202,7 @@ const url = 'mongodb://localhost:27017/sheetjs';
|
||||
const db_name = 'sheetjs';
|
||||
|
||||
/* Connect to mongodb server */
|
||||
const client = await MongoClient.connect(url, { useUnifiedTopology: true });
|
||||
const client = await MongoClient.connect(url, {});
|
||||
|
||||
/* Sample data table */
|
||||
const db = client.db(db_name);
|
||||
|
@ -29,12 +29,13 @@ This demo was tested in the following environments:
|
||||
|
||||
| PouchDB | Date |
|
||||
|:--------|:----------:|
|
||||
| `8.0.1` | 2024-05-04 |
|
||||
| `7.3.1` | 2024-05-04 |
|
||||
| `6.4.3` | 2024-05-04 |
|
||||
| `5.4.5` | 2024-05-04 |
|
||||
| `4.0.3` | 2024-05-04 |
|
||||
| `3.6.0` | 2024-05-04 |
|
||||
| `9.0.0` | 2025-01-19 |
|
||||
| `8.0.1` | 2025-01-19 |
|
||||
| `7.3.1` | 2025-01-19 |
|
||||
| `6.4.3` | 2025-01-19 |
|
||||
| `5.4.5` | 2025-01-19 |
|
||||
| `4.0.3` | 2025-01-19 |
|
||||
| `3.6.0` | 2025-01-19 |
|
||||
|
||||
:::
|
||||
|
||||
@ -151,7 +152,7 @@ md5sum master.zip || md5 master.zip
|
||||
|
||||
The second command will display the checksum:
|
||||
|
||||
```bash
|
||||
```text title="Expected Checksum"
|
||||
ac4da7cb0cade1be293ba222462f109c master.zip
|
||||
```
|
||||
|
||||
@ -185,7 +186,7 @@ Upgrade PouchDB by changing the `src` attribute to the production build[^10]:
|
||||
<script src="//cdn.jsdelivr.net/npm/pouchdb@8.0.1/dist/pouchdb.min.js"></script>
|
||||
```
|
||||
|
||||
4) Just before the end of `js/app.js`, add a `click` event listener:
|
||||
4) Add a `click` event listener near the end of `js/app.js`, within the IIFE:
|
||||
|
||||
```js title="js/app.js (add highlighted lines)"
|
||||
if (remoteCouch) {
|
||||
@ -200,7 +201,7 @@ Upgrade PouchDB by changing the `src` attribute to the production build[^10]:
|
||||
return rest;
|
||||
});
|
||||
const ws = XLSX.utils.json_to_sheet(aoo);
|
||||
const wb = XLSX.utils.book_new(); XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
|
||||
const wb = XLSX.utils.book_new(ws, "Sheet1");
|
||||
XLSX.writeFile(wb, "SheetJSPouch.xlsx");
|
||||
});
|
||||
});
|
||||
|
@ -40,7 +40,7 @@ This demo was tested in the following deployments:
|
||||
| OS and Version | Architecture | Excel | Date |
|
||||
|:---------------|:-------------|:-----------|:-----------|
|
||||
| macOS 14.5 | `darwin-arm` | 16.81 | 2024-12-22 |
|
||||
| Windows 11 | `win11-x64` | 365 (2407) | 2024-08-11 |
|
||||
| Windows 11 | `win11-x64` | 365 (2501) | 2025-01-19 |
|
||||
|
||||
:::
|
||||
|
||||
@ -124,7 +124,10 @@ export async function extern(url) {
|
||||
|
||||
/* Return Data */
|
||||
return aoa;
|
||||
} catch(e) { return [[e.message || e]]; } // pass error back to Excel
|
||||
} catch(e) {
|
||||
/* Pass error message back */
|
||||
return [[e.message || e]];
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -963,7 +963,7 @@ This demo was last tested in the following deployments:
|
||||
|
||||
| Architecture | V8 Crate | Date |
|
||||
|:-------------|:----------|:-----------|
|
||||
| `darwin-x64` | `0.92.0` | 2024-05-28 |
|
||||
| `darwin-x64` | `130.0.7` | 2025-01-19 |
|
||||
| `darwin-arm` | `0.92.0` | 2024-05-25 |
|
||||
| `win11-x64` | `130.0.2` | 2024-12-20 |
|
||||
| `linux-x64` | `130.0.7` | 2025-01-09 |
|
||||
@ -1046,7 +1046,7 @@ This demo was last tested in the following deployments:
|
||||
|
||||
| Architecture | V8 Version | Javet | Java | Date |
|
||||
|:-------------|:--------------|:--------|:----------|:-----------|
|
||||
| `darwin-x64` | `12.6.228.13` | `3.1.3` | `22` | 2024-06-19 |
|
||||
| `darwin-x64` | `13.2.152.16` | `4.1.1` | `22` | 2025-01-19 |
|
||||
| `darwin-arm` | `12.6.228.13` | `3.1.3` | `11.0.23` | 2024-06-19 |
|
||||
| `win11-x64` | `12.6.228.13` | `3.1.3` | `21.0.5` | 2024-12-20 |
|
||||
| `linux-x64` | `12.6.228.13` | `3.1.3` | `17.0.7` | 2024-06-20 |
|
||||
@ -1070,7 +1070,8 @@ cd sheetjs-javet
|
||||
<TabItem value="darwin-x64" label="Intel Mac">
|
||||
|
||||
```bash
|
||||
curl -LO https://repo1.maven.org/maven2/com/caoccao/javet/javet-macos/3.1.3/javet-macos-3.1.3.jar
|
||||
curl -LO https://repo1.maven.org/maven2/com/caoccao/javet/javet/4.1.1/javet-4.1.1.jar
|
||||
curl -LO https://repo1.maven.org/maven2/com/caoccao/javet/javet-v8-macos-x86_64/4.1.1/javet-v8-macos-x86_64-4.1.1.jar
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@ -1135,8 +1136,8 @@ curl -LO https://docs.sheetjs.com/v8/SheetJSJavet.java
|
||||
<TabItem value="darwin-x64" label="Intel Mac">
|
||||
|
||||
```bash
|
||||
javac -cp ".:javet-macos-3.1.3.jar" SheetJSJavet.java
|
||||
java -cp ".:javet-macos-3.1.3.jar" SheetJSJavet pres.xlsx
|
||||
javac -cp ".:javet-4.1.1.jar:javet-v8-macos-x86_64-4.1.1.jar" SheetJSJavet.java
|
||||
java -cp ".:javet-4.1.1.jar:javet-v8-macos-x86_64-4.1.1.jar" SheetJSJavet pres.xlsx
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@ -1494,13 +1495,13 @@ and export the workbook to NUMBERS.
|
||||
|
||||
This demo was last tested in the following deployments:
|
||||
|
||||
| Architecture | V8 Version | Crate | Date |
|
||||
|:-------------|:--------------|:---------|:-----------|
|
||||
| `darwin-x64` | `12.6.228.3` | `0.92.0` | 2024-05-28 |
|
||||
| `darwin-arm` | `12.6.228.3` | `0.92.0` | 2024-12-20 |
|
||||
| `win11-x64` | `12.6.228.3` | `0.92.0` | 2024-12-20 |
|
||||
| `linux-x64` | `12.6.228.3` | `0.92.0` | 2025-01-02 |
|
||||
| `linux-arm` | `12.6.228.3` | `0.92.0` | 2024-05-26 |
|
||||
| Architecture | V8 Version | Crate | Date |
|
||||
|:-------------|:--------------|:----------|:-----------|
|
||||
| `darwin-x64` | `13.0.245.12` | `130.0.7` | 2025-01-19 |
|
||||
| `darwin-arm` | `12.6.228.3` | `0.92.0` | 2024-12-20 |
|
||||
| `win11-x64` | `12.6.228.3` | `0.92.0` | 2024-12-20 |
|
||||
| `linux-x64` | `12.6.228.3` | `0.92.0` | 2025-01-02 |
|
||||
| `linux-arm` | `12.6.228.3` | `0.92.0` | 2024-05-26 |
|
||||
|
||||
:::
|
||||
|
||||
|
BIN
docz/static/cap/and-export-popup.png
Normal file
BIN
docz/static/cap/and-export-popup.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
BIN
docz/static/cap/ios-export-popup.png
Normal file
BIN
docz/static/cap/ios-export-popup.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 269 KiB |
Binary file not shown.
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 90 KiB |
Loading…
Reference in New Issue
Block a user