forked from sheetjs/docs.sheetjs.com
		
	Konqueror 22
This commit is contained in:
		
							parent
							
								
									9e7ef1f399
								
							
						
					
					
						commit
						9efdb8ad2b
					
				| @ -139,6 +139,10 @@ function SheetJSTestDropbox() { | ||||
| 
 | ||||
| ## Other Notes | ||||
| 
 | ||||
| `static/shim.js` shims the following functions: | ||||
| 
 | ||||
| - `Object.hasOwn` | ||||
| 
 | ||||
| `src/theme/Admonition` was swizzled from 3.2.1 to enable `pass` for hiding | ||||
| header text. See Docusaurus issue 8568 for more details. | ||||
| 
 | ||||
|  | ||||
| @ -38,10 +38,11 @@ tutorial first. | ||||
| 
 | ||||
| This browser demo was tested in the following environments: | ||||
| 
 | ||||
| | Browser     | Date       | | ||||
| |:------------|:-----------| | ||||
| | Chrome 133  | 2025-03-30 | | ||||
| | Safari 18.3 | 2025-03-30 | | ||||
| | Browser      | Date       | | ||||
| |:-------------|:-----------| | ||||
| | Chromium 133 | 2025-03-30 | | ||||
| | Safari 18.3  | 2025-03-30 | | ||||
| | Konqueror 22 | 2025-04-23 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
|  | ||||
| @ -21,10 +21,11 @@ This demo covers details elided in the official DanfoJS documentation. | ||||
| 
 | ||||
| This demo was tested in the following deployments: | ||||
| 
 | ||||
| | Platform    | Version | Date       | | ||||
| |:------------|:--------|:-----------| | ||||
| | Chrome 131  | `1.1.2` | 2025-01-01 | | ||||
| | Safari 18.2 | `1.1.2` | 2025-01-01 | | ||||
| | Platform     | Version | Date       | | ||||
| |:-------------|:--------|:-----------| | ||||
| | Chromium 131 | `1.1.2` | 2025-01-01 | | ||||
| | Safari 18.2  | `1.1.2` | 2025-01-01 | | ||||
| | Konqueror 22 | `1.1.2` | 2025-04-23 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
|  | ||||
| @ -34,10 +34,11 @@ results back to spreadsheets. | ||||
| 
 | ||||
| Each browser demo was tested in the following environments: | ||||
| 
 | ||||
| | Browser     | TF.js     | Date       | | ||||
| |:------------|:----------|:-----------| | ||||
| | Chrome 133  | `4.22.0`  | 2025-04-21 | | ||||
| | Safari 18.3 | `4.22.0`  | 2025-04-21 | | ||||
| | Browser      | TF.js     | Date       | | ||||
| |:-------------|:----------|:-----------| | ||||
| | Chromium 133 | `4.22.0`  | 2025-04-21 | | ||||
| | Safari 18.3  | `4.22.0`  | 2025-04-21 | | ||||
| | Konqueror 22 | `4.22.0`  | 2025-04-23 | | ||||
| 
 | ||||
| The NodeJS demo was tested in the following environments: | ||||
| 
 | ||||
|  | ||||
| @ -37,6 +37,7 @@ This demo was tested in the following environments: | ||||
| | Browser      | Version           | Date       | | ||||
| |:-------------|:------------------|:-----------| | ||||
| | Chromium 133 | `1.8.2`  (latest) | 2025-03-30 | | ||||
| | Konqueror 22 | `1.8.2`  (latest) | 2025-04-23 | | ||||
| | Chromium 133 | `1.2.32` (legacy) | 2025-03-30 | | ||||
| 
 | ||||
| ::: | ||||
|  | ||||
| @ -77,6 +77,7 @@ This demo was tested in the following environments: | ||||
| | Platform     | Date       | | ||||
| |:-------------|:-----------| | ||||
| | Chromium 133 | 2025-03-30 | | ||||
| | Konqueror 22 | 2025-04-23 | | ||||
| 
 | ||||
| Demos exclusively using Dojo Core were tested using Dojo Toolkit `1.17.3`. | ||||
| 
 | ||||
|  | ||||
| @ -88,10 +88,11 @@ first worksheet. The SheetJS `sheet_to_html` method[^2] creates the HTML table. | ||||
| 
 | ||||
| Each browser demo was tested in the following environments: | ||||
| 
 | ||||
| | Browser     | Date       | | ||||
| |:------------|:-----------| | ||||
| | Chrome 133  | 2025-03-30 | | ||||
| | Safari 18.3 | 2025-03-30 | | ||||
| | Browser      | Date       | | ||||
| |:-------------|:-----------| | ||||
| | Chromium 133 | 2025-03-30 | | ||||
| | Safari 18.3  | 2025-03-30 | | ||||
| | Konqueror 22 | 2025-04-23 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
|  | ||||
| @ -133,10 +133,11 @@ response. If the process was successful, a HTML table will be displayed | ||||
| 
 | ||||
| Each browser demo was tested in the following environments: | ||||
| 
 | ||||
| | Browser     | Date       | | ||||
| |:------------|:-----------| | ||||
| | Chrome 133  | 2025-03-30 | | ||||
| | Safari 18.3 | 2025-03-30 | | ||||
| | Browser      | Date       | | ||||
| |:-------------|:-----------| | ||||
| | Chromium 133 | 2025-03-30 | | ||||
| | Safari 18.3  | 2025-03-30 | | ||||
| | Konqueror 22 | 2025-04-23 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
|  | ||||
| @ -36,11 +36,12 @@ the file can be downloaded or previewed in the browser. | ||||
| 
 | ||||
| This demo was tested in the following deployments: | ||||
| 
 | ||||
| | Platform    | Version  | Date       | | ||||
| |:------------|:---------|:-----------| | ||||
| | Chrome 131  | `1.9.0`  | 2024-12-22 | | ||||
| | NodeJS 20   | `1.10.0` | 2024-12-22 | | ||||
| | BunJS 1.1   | `1.10.0` | 2024-12-22 | | ||||
| | Platform     | Version  | Date       | | ||||
| |:-------------|:---------|:-----------| | ||||
| | Chromium 131 | `1.9.0`  | 2024-12-22 | | ||||
| | Konqueror 22 | `1.9.0`  | 2025-04-23 | | ||||
| | NodeJS 20    | `1.10.0` | 2024-12-22 | | ||||
| | BunJS 1.1    | `1.10.0` | 2024-12-22 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
|  | ||||
| @ -18,10 +18,11 @@ With a familiar UI, `x-spreadsheet` is an excellent choice for a modern editor. | ||||
| 
 | ||||
| This demo was tested in the following environments: | ||||
| 
 | ||||
| | Browser     | Date       | | ||||
| |:------------|:-----------| | ||||
| | Chrome 131  | 2024-12-31 | | ||||
| | Safari 18.2 | 2024-12-31 | | ||||
| | Browser      | Date       | | ||||
| |:-------------|:-----------| | ||||
| | Chromium 131 | 2024-12-31 | | ||||
| | Safari 18.2  | 2024-12-31 | | ||||
| | Konqueror 22 | 2025-04-23 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
|  | ||||
| @ -17,10 +17,11 @@ with a straightforward API. | ||||
| 
 | ||||
| This demo was tested in the following environments: | ||||
| 
 | ||||
| | Browser     | Date       | | ||||
| |:------------|:-----------| | ||||
| | Chrome 131  | 2024-12-31 | | ||||
| | Safari 18.2 | 2024-12-31 | | ||||
| | Browser      | Date       | | ||||
| |:-------------|:-----------| | ||||
| | Chromium 131 | 2024-12-31 | | ||||
| | Safari 18.2  | 2024-12-31 | | ||||
| | Konqueror 22 | 2025-04-23 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
|  | ||||
| @ -25,6 +25,7 @@ This demo was tested in the following deployments: | ||||
| | Browser      | Version | Date       | | ||||
| |:-------------|:--------|:-----------| | ||||
| | Chromium 133 | `6.3.1` | 2025-03-31 | | ||||
| | Konqueror 22 | `6.3.1` | 2025-04-23 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
|  | ||||
| @ -28,7 +28,8 @@ This demo was tested in the following deployments: | ||||
| 
 | ||||
| | Browser      | Version | Date       | | ||||
| |:-------------|:--------|:-----------| | ||||
| | Chromium 125 | `1.4.0` | 2024-06-13 | | ||||
| | Chromium 135 | `1.4.3` | 2025-04-23 | | ||||
| | Konqueror 22 | `1.4.3` | 2025-04-23 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -40,7 +41,7 @@ installation in ViteJS projects using Vue 3 Table Lite. | ||||
| Using the `npm` tool, this command installs SheetJS and Vue 3 Table Lite: | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz vue3-table-lite@1.4.0`} | ||||
| npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz vue3-table-lite@1.4.3`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| #### Rows and Columns Bindings | ||||
| @ -136,7 +137,7 @@ cd sheetjs-vtl | ||||
| 2) Install dependencies: | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz vue3-table-lite@1.4.0`} | ||||
| npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz vue3-table-lite@1.4.3`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 3) Download [`src/App.vue`](pathname:///vtl/App.vue) and replace the contents: | ||||
|  | ||||
| @ -30,7 +30,28 @@ This demo was tested in the following environments: | ||||
| 
 | ||||
| | Browser      | Version | Date       | | ||||
| |:-------------|:--------|:-----------| | ||||
| | Chromium 125 | `5.3.2` | 2024-06-09 | | ||||
| | Chromium 135 | `5.3.2` | 2025-04-23 | | ||||
| | Konqueror 22 | `5.3.2` | 2025-04-23 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| :::danger pass | ||||
| 
 | ||||
| **Glide Data Grid is not compatible with ReactJS 19!** | ||||
| 
 | ||||
| When trying to install in a new project, `npm install` will fail: | ||||
| 
 | ||||
| ``` | ||||
| npm error Found: react@19.1.0 | ||||
| npm error node_modules/react | ||||
| npm error   react@"^19.0.0" from the root project | ||||
| npm error | ||||
| npm error Could not resolve dependency: | ||||
| npm error peer react@"^16.12.0 || 17.x || 18.x" from @glideapps/glide-data-grid@5.3.2 | ||||
| npm error node_modules/@glideapps/glide-data-grid | ||||
| ``` | ||||
| 
 | ||||
| This demo explicitly uses ReactJS 18. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -344,13 +365,19 @@ cd sheetjs-gdg | ||||
| npm i | ||||
| ``` | ||||
| 
 | ||||
| 2) Install SheetJS and Glide Data Grid libraries: | ||||
| 2) Explicitly downgrade ReactJS to version 18: | ||||
| 
 | ||||
| ```bash | ||||
| npm i --save react@18 react-dom@18 | ||||
| ``` | ||||
| 
 | ||||
| 3) Install SheetJS and Glide Data Grid libraries: | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz @glideapps/glide-data-grid@5.3.2`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 3) Start dev server: | ||||
| 4) Start the dev server: | ||||
| 
 | ||||
| ```bash | ||||
| npm run dev | ||||
| @ -359,21 +386,21 @@ npm run dev | ||||
| The terminal window will display a URL (typically `http://localhost:5173`). | ||||
| Open the URL with a web browser and confirm that a page loads. | ||||
| 
 | ||||
| 4) Download [`App.tsx`](pathname:///gdg/App.tsx) and replace `src/App.tsx`: | ||||
| 5) Download [`App.tsx`](pathname:///gdg/App.tsx) and replace `src/App.tsx`: | ||||
| 
 | ||||
| ```bash | ||||
| curl -L -o src/App.tsx https://docs.sheetjs.com/gdg/App.tsx | ||||
| ``` | ||||
| 
 | ||||
| **Testing** | ||||
| #### Testing | ||||
| 
 | ||||
| 5) Refresh the browser window. A grid should be displayed: | ||||
| 6) Refresh the browser window. A grid should be displayed: | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| The demo downloads and processes https://docs.sheetjs.com/pres.numbers . | ||||
| 
 | ||||
| 6) Make some changes to the grid data. | ||||
| 7) Make some changes to the grid data. | ||||
| 
 | ||||
| :::note pass | ||||
| 
 | ||||
| @ -388,14 +415,14 @@ values should be 41, 42, 43, 44, and 45, as shown in the screenshot below: | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| 7) Click on the "Export" button. The browser should attempt to download a XLSX | ||||
| 8) Click on the "Export" button. The browser should attempt to download a XLSX | ||||
| file (`sheetjs-gdg.xlsx`). Save the file. | ||||
| 
 | ||||
| Open the generated file and verify the contents match the grid. | ||||
| 
 | ||||
| 8) Reload the page. The contents will revert back to the original table. | ||||
| 9) Reload the page. The contents will revert back to the original table. | ||||
| 
 | ||||
| 9) Click "Choose File" and select the new `sheetjs-gdg.xlsx` file. The table | ||||
| 10) Click "Choose File" and select the new `sheetjs-gdg.xlsx` file. The table | ||||
| should update with the data in the file. | ||||
| 
 | ||||
| [^1]: See ["Array of Objects" in the ReactJS demo](/docs/demos/frontend/react#array-of-objects) | ||||
|  | ||||
| @ -26,10 +26,11 @@ user-supplied sheets and exports data to XLSX workbooks: | ||||
| 
 | ||||
| This demo was tested in the following environments: | ||||
| 
 | ||||
| | Version         | Date       | Notes                | | ||||
| |:----------------|:-----------|:---------------------| | ||||
| | `7.0.0-beta.19` | 2024-06-09 |                      | | ||||
| | `7.0.0-beta.44` | 2024-06-09 | Editing did not work | | ||||
| | Browser      | Version         | Date       | Notes                       | | ||||
| |:-------------|:----------------|:-----------|:----------------------------| | ||||
| | Chromium 135 | `7.0.0-beta.19` | 2025-04-23 | Requires ReactJS 18         | | ||||
| | Chromium 135 | `7.0.0-beta.52` | 2025-04-23 | No edit support             | | ||||
| | Konqueror 22 | `7.0.0-beta.52` | 2025-04-23 | No edit support, CSS errors | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -38,7 +39,8 @@ This demo was tested in the following environments: | ||||
| When this demo was last tested against the latest version, the grid correctly | ||||
| displayed data but data could not be edited by the user. | ||||
| 
 | ||||
| The current recommendation is to use version `7.0.0-beta.19`. | ||||
| The current recommendation is to use version `7.0.0-beta.19` and to forcefully | ||||
| downgrade ReactJS to version 18. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -159,6 +161,18 @@ cd sheetjs-rdg | ||||
| npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz react-data-grid@7.0.0-beta.19`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| <details> | ||||
|   <summary><b>Installing RDG version that supports editing</b> (click to show)</summary> | ||||
| 
 | ||||
| Editing support requires ReactJS 18 and React DataGrid version `7.0.0-beta.19`: | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| npm i -S react@18 react-dom@18 | ||||
| npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz react-data-grid@7.0.0-beta.19`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| </details> | ||||
| 
 | ||||
| 3) Download [`App.tsx`](pathname:///rdg/App.tsx) and replace `src/App.tsx`. | ||||
| 
 | ||||
| ```bash | ||||
| @ -174,6 +188,30 @@ npm run dev | ||||
| The terminal window will display a URL (typically `http://localhost:5173`). | ||||
| Open the URL with a web browser and confirm that a page loads. | ||||
| 
 | ||||
| :::caution pass | ||||
| 
 | ||||
| **There were breaking changes in point releases of React DataGrid!** | ||||
| 
 | ||||
| The JavaScript console may show an error message referencing `default`: | ||||
| 
 | ||||
| ``` | ||||
| Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/react-data-grid.js?v=f9b1b87a' does not provide an export named 'default' (at App.tsx:2:8) | ||||
| ``` | ||||
| 
 | ||||
| In a point release, `DataGrid` was moved from the default export to a named | ||||
| export. The `src/App.tsx` script must be edited to reflect the change: | ||||
| 
 | ||||
| ```js title="src/App.tsx (edit highlighted lines)" | ||||
| import React, { useEffect, useState, ChangeEvent } from "react"; | ||||
| // highlight-next-line | ||||
| import { textEditor, Column, DataGrid } from "react-data-grid"; | ||||
| import { read, utils, WorkSheet, writeFile } from "xlsx"; | ||||
| ``` | ||||
| 
 | ||||
| After updating the script, the webpage must be manually refreshed. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| #### Testing | ||||
| 
 | ||||
| 5) Confirm the table shows a list of Presidents. | ||||
|  | ||||
| @ -184,9 +184,10 @@ export default function MUITableSheetJSExport() { | ||||
| 
 | ||||
| This demo was tested in the following deployments: | ||||
| 
 | ||||
| | Material UI | Emotion   | Date       | | ||||
| |:------------|:----------|:-----------| | ||||
| | `5.15.20`   | `11.11.4` | 2024-06-12 | | ||||
| | Browser      | Material UI | Emotion   | Date       | | ||||
| |:-------------|:------------|:----------|:-----------| | ||||
| | Chromium 135 | `7.0.2`     | `11.11.4` | 2025-04-23 | | ||||
| | Konqueror 22 | `7.0.2`     | `11.11.4` | 2025-04-23 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -200,7 +201,7 @@ cd sheetjs-mui | ||||
| 2) Install dependencies: | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz @mui/material@5.15.20 @emotion/react@11.11.4 @emotion/styled@11.11.5`} | ||||
| npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz @mui/material@7.0.2 @emotion/react@11.11.4 @emotion/styled@11.11.5`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 3) Download [`App.tsx`](pathname:///mui/table/App.tsx) and replace `src/App.tsx`. | ||||
| @ -215,8 +216,14 @@ curl -L -o src/App.tsx https://docs.sheetjs.com/mui/table/App.tsx | ||||
| npm run dev | ||||
| ``` | ||||
| 
 | ||||
| The script should open the live demo in a web browser. Click the "Export" button | ||||
| to save the file.  Open the generated file in a spreadsheet editor. | ||||
| The terminal window will display a URL (typically `http://localhost:5173`). | ||||
| Open the URL with a web browser and confirm that a page loads. | ||||
| 
 | ||||
| Confirm the table shows a list of Presidents. When the page loads, it will fetch | ||||
| https://docs.sheetjs.com/pres.numbers, parse with SheetJS, and load the data in | ||||
| the data grid. | ||||
| 
 | ||||
| Click the "Export" button and open the generated file in a spreadsheet editor. | ||||
| 
 | ||||
| ## Material UI Data Grid | ||||
| 
 | ||||
| @ -330,9 +337,10 @@ export default function App() { | ||||
| 
 | ||||
| This demo was tested in the following deployments: | ||||
| 
 | ||||
| | Data Grid | Emotion   | Date       | | ||||
| |:----------|:----------|:-----------| | ||||
| | `7.6.2`   | `11.11.4` | 2024-06-12 | | ||||
| | Browser      | Data Grid | Emotion   | Date       | | ||||
| |:-------------|:----------|:----------|:-----------| | ||||
| | Chromium 125 | `8.0.0`   | `11.11.4` | 2025-04-23 | | ||||
| | Konqueror 22 | `8.0.0`   | `11.11.4` | 2025-04-23 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -346,7 +354,7 @@ cd sheetjs-muidg | ||||
| 2) Install dependencies: | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz @mui/x-data-grid@7.6.2 @emotion/react@11.11.4 @emotion/styled@11.11.5`} | ||||
| npm i -S https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz @mui/x-data-grid@8.0.0 @emotion/react@11.11.4 @emotion/styled@11.11.5`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 3) Download [`App.tsx`](pathname:///mui/dg/App.tsx) and replace `src/App.tsx`. | ||||
| @ -361,8 +369,30 @@ curl -L -o src/App.tsx https://docs.sheetjs.com/mui/dg/App.tsx | ||||
| npm run dev | ||||
| ``` | ||||
| 
 | ||||
| The terminal window will display a URL (typically `http://localhost:5173`). | ||||
| Open the URL with a web browser and confirm that a page loads. | ||||
| 
 | ||||
| When the page loads, it will process https://docs.sheetjs.com/pres.numbers | ||||
| 
 | ||||
| :::caution pass | ||||
| 
 | ||||
| The data grid uses nascent ECMAScript features that are not supported in older | ||||
| browsers. Shims can be added in the `<head>` section of `index.html`: | ||||
| 
 | ||||
| ```html title="index.html (add highlighted lines in HEAD)" | ||||
|   <head> | ||||
|     <meta charset="UTF-8" /> | ||||
| <!-- highlight-start --> | ||||
|     <script> | ||||
| /* workarounds for legacy browsers */ | ||||
| if(!Object.hasOwn) Object.hasOwn = function(o, v) { return o.hasOwnProperty(v); }; | ||||
| if(!Array.prototype.at) Array.prototype.at = function(idx) { return this[idx < 0 ? idx + this.length : idx]; }; | ||||
|     </script> | ||||
| <!-- highlight-end --> | ||||
| ``` | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| [^1]: See ["Sheet Objects"](/docs/csf/sheet) | ||||
| [^2]: See [`sheet_to_json` in "Utilities"](/docs/api/utilities/array#array-output) | ||||
| [^3]: See [`table_to_book` in "HTML" Utilities](/docs/api/utilities/html#create-new-sheet) | ||||
|  | ||||
| @ -48,7 +48,7 @@ This demo was tested in the following environments: | ||||
| 
 | ||||
| | Nuxt Content | Nuxt       | Date       | | ||||
| |:-------------|:-----------|:-----------| | ||||
| | `1.15.1`     | `2.18.1`   | 2024-11-14 | | ||||
| | `1.15.1`     | `2.18.1`   | 2025-04-23 | | ||||
| | `2.13.4`     | `3.14.159` | 2024-11-14 | | ||||
| 
 | ||||
| ::: | ||||
| @ -58,7 +58,7 @@ This demo was tested in the following environments: | ||||
| Nuxt embeds telemetry. According to the docs, it can be disabled with: | ||||
| 
 | ||||
| ```bash | ||||
| npx nuxt telemetry disable | ||||
| npx -y nuxt telemetry disable | ||||
| ``` | ||||
| 
 | ||||
| **When the demo was last tested, this command did not work.** | ||||
| @ -268,7 +268,7 @@ The recommended solution is to switch to Node 18. | ||||
| 1) Create a stock app: | ||||
| 
 | ||||
| ```bash | ||||
| npx create-nuxt-app@4.0.0 sheetjs-nuxt | ||||
| npx -y create-nuxt-app@4.0.0 sheetjs-nuxt | ||||
| ``` | ||||
| 
 | ||||
| When prompted, enter the following options: | ||||
| @ -412,7 +412,7 @@ This will create a static site in the `dist` folder. | ||||
| 9) Serve the static site: | ||||
| 
 | ||||
| ```bash | ||||
| npx http-server dist | ||||
| npx -y http-server dist | ||||
| ``` | ||||
| 
 | ||||
| Access the displayed URL (typically `http://localhost:8080`) in a web browser. | ||||
|  | ||||
| @ -40,6 +40,7 @@ This demo was tested in the following environments: | ||||
| | Platform         | Connector Library           | Date       | | ||||
| |:-----------------|:----------------------------|:-----------| | ||||
| | Chromium 131     | `sql.js` (`1.8.0`)          | 2025-01-08 | | ||||
| | Konqueror 22     | `sql.js` (`1.8.0`)          | 2025-04-23 | | ||||
| | NodeJS `20.18.0` | `better-sqlite3` (`11.7.2`) | 2025-01-08 | | ||||
| | BunJS `1.1.43`   | (built-in)                  | 2025-01-08 | | ||||
| | Deno `2.1.4`     | `sqlite` (`3.9.1`)          | 2025-01-09 | | ||||
|  | ||||
| @ -12,6 +12,8 @@ sidebar_custom_props: | ||||
| </head> | ||||
| 
 | ||||
| import current from '/version.js'; | ||||
| import Tabs from '@theme/Tabs'; | ||||
| import TabItem from '@theme/TabItem'; | ||||
| import CodeBlock from '@theme/CodeBlock'; | ||||
| 
 | ||||
| [AlaSQL](https://alasql.org/) is a pure JavaScript in-memory SQL database. It | ||||
| @ -28,10 +30,12 @@ strategies for general data processing in AlaSQL expressions. | ||||
| 
 | ||||
| This demo was tested in the following environments: | ||||
| 
 | ||||
| | Environment         | AlaSQL |    Date    | | ||||
| |:--------------------|:-------|:----------:| | ||||
| | NodeJS              | 3.1.0  | 2024-06-03 | | ||||
| | Standalone (Chrome) | 3.1.0  | 2024-06-03 | | ||||
| | Environment  | AlaSQL |    Date    | | ||||
| |:-------------|:-------|:----------:| | ||||
| | Chromium 135 | 3.1.0  | 2025-04-23 | | ||||
| | Konqueror 22 | 3.1.0  | 2025-04-23 | | ||||
| | NodeJS       | 3.1.0  | 2025-04-23 | | ||||
| | BunJS        | 3.1.0  | 2025-04-23 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -263,8 +267,8 @@ const { promise: alasql } = require("alasql"); | ||||
| 1) Create an empty folder for the project: | ||||
| 
 | ||||
| ```bash | ||||
| mkdir alasql | ||||
| cd alasql | ||||
| mkdir sheetjs-alasql | ||||
| cd sheetjs-alasql | ||||
| ``` | ||||
| 
 | ||||
| 2) In the folder, create a stub `package.json` with the `xlsx` override: | ||||
| @ -279,10 +283,23 @@ cd alasql | ||||
| 
 | ||||
| 3) Install SheetJS and AlaSQL: | ||||
| 
 | ||||
| <Tabs groupId="ssplat"> | ||||
|   <TabItem value="nodejs" label="NodeJS"> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| npm i --save alasql@3.1.0 https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
|   </TabItem> | ||||
|   <TabItem value="bun" label="Bun"> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| bun i --save alasql@3.1.0 https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
|   </TabItem> | ||||
| </Tabs> | ||||
| 
 | ||||
| 4) Download the test file https://docs.sheetjs.com/pres.numbers : | ||||
| 
 | ||||
| ```bash | ||||
| @ -311,11 +328,24 @@ const { promise: alasql } = require("alasql"); | ||||
| 
 | ||||
| 6) Run the test script | ||||
| 
 | ||||
| <Tabs groupId="ssplat"> | ||||
|   <TabItem value="nodejs" label="NodeJS"> | ||||
| 
 | ||||
| ```bash | ||||
| node SheetJSAlaSQL.js | ||||
| ``` | ||||
| 
 | ||||
| The output should display: | ||||
|   </TabItem> | ||||
|   <TabItem value="bun" label="Bun"> | ||||
| 
 | ||||
| ```bash | ||||
| bun run SheetJSAlaSQL.js | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
| </Tabs> | ||||
| 
 | ||||
| The script will print the following array of objects: | ||||
| 
 | ||||
| ```js | ||||
| [ | ||||
| @ -325,7 +355,7 @@ The output should display: | ||||
| ] | ||||
| ``` | ||||
| 
 | ||||
| The script should generate `SheetJSAlaSQL1.xlsx` with the additional row: | ||||
| The script will generate `SheetJSAlaSQL1.xlsx` with an additional row: | ||||
| 
 | ||||
| ```csv | ||||
| Name,Index | ||||
|  | ||||
| @ -274,8 +274,8 @@ const u8 = new Uint8Array(array); | ||||
| 
 | ||||
| :::danger pass | ||||
| 
 | ||||
| Not all web APIs are supported in all browsers.  For example, Firefox does not | ||||
| support the "File System Access API". | ||||
| Not all web APIs are supported in all browsers.  For example, Konqueror and | ||||
| Firefox do not support the "File System Access API". | ||||
| 
 | ||||
| Even when a browser technically supports a web API, it may be disabled in the | ||||
| client browser. Some APIs do not give any feedback. | ||||
| @ -464,16 +464,17 @@ When this demo was last tested, Google Chrome did not add an entry to the | ||||
| 
 | ||||
| This browser demo was tested in the following environments: | ||||
| 
 | ||||
| | Browser     | Date       | | ||||
| |:------------|:-----------| | ||||
| | Chrome 131  | 2025-01-07 | | ||||
| | Browser      | Date       | | ||||
| |:-------------|:-----------| | ||||
| | Chromium 131 | 2025-01-07 | | ||||
| 
 | ||||
| Some lesser-used browsers do not support File System Access API: | ||||
| 
 | ||||
| | Browser     | Date       | | ||||
| |:------------|:-----------| | ||||
| | Safari 17.5 | 2025-01-07 | | ||||
| | Firefox 133 | 2025-01-07 | | ||||
| | Browser      | Date       | | ||||
| |:-------------|:-----------| | ||||
| | Safari 17.5  | 2025-01-07 | | ||||
| | Konqueror 22 | 2025-04-23 | | ||||
| | Firefox 133  | 2025-01-07 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
|  | ||||
| @ -156,17 +156,18 @@ This workbook is typically exported to the filesystem with `writeFile`[^6]. | ||||
| 
 | ||||
| This browser demo was tested in the following environments: | ||||
| 
 | ||||
| | Browser     | Date       | | ||||
| |:------------|:-----------| | ||||
| | Chrome 118  | 2025-03-30 | | ||||
| | Browser      | Date       | | ||||
| |:-------------|:-----------| | ||||
| | Konqueror 22 | 2025-04-23 | | ||||
| | Chromium 118 | 2025-03-30 | | ||||
| 
 | ||||
| Browsers that do not support WebSQL will throw errors: | ||||
| 
 | ||||
| | Browser     | Date       | Error Message                 | | ||||
| |:------------|:-----------|:------------------------------| | ||||
| | Chrome 133  | 2025-03-30 | `openDatabase is not defined` | | ||||
| | Safari 18.3 | 2025-03-30 | `Web SQL is deprecated`       | | ||||
| | Firefox 136 | 2025-03-30 | `openDatabase is not defined` | | ||||
| | Browser      | Date       | Error Message                 | | ||||
| |:-------------|:-----------|:------------------------------| | ||||
| | Chromium 133 | 2025-03-30 | `openDatabase is not defined` | | ||||
| | Safari 18.3  | 2025-03-30 | `Web SQL is deprecated`       | | ||||
| | Firefox 136  | 2025-03-30 | `openDatabase is not defined` | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
|  | ||||
| @ -18,10 +18,11 @@ This demo covers two common use patterns: | ||||
| 
 | ||||
| Each browser demo was tested in the following environments: | ||||
| 
 | ||||
| | Browser     | Date       | | ||||
| |:------------|:-----------| | ||||
| | Chrome 131  | 2024-12-23 | | ||||
| | Safari 18.2 | 2024-12-31 | | ||||
| | Browser      | Date       | | ||||
| |:-------------|:-----------| | ||||
| | Chromium 131 | 2024-12-23 | | ||||
| | Safari 18.2  | 2024-12-31 | | ||||
| | Konqueror 22 | 2025-04-23 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
|  | ||||
| @ -20,10 +20,17 @@ Not all Clipboard APIs offer access to all clipboard types. | ||||
| 
 | ||||
| Each browser demo was tested in the following environments: | ||||
| 
 | ||||
| | Browser     | Date       | Notes | ||||
| |:------------|:-----------|:-------------------------| | ||||
| | Chrome 126  | 2024-06-30 |                          | | ||||
| | Safari 17.3 | 2024-06-30 | `text/rtf` not supported | | ||||
| | Browser      | Architecture | Date       | Notes                           | | ||||
| |:-------------|:-------------|:-----------|:--------------------------------| | ||||
| | Chromium 133 | `darwin-arm` | 2025-04-23 |                                 | | ||||
| | Safari 17.5  | `darwin-arm` | 2025-04-23 | `text/rtf` not supported        | | ||||
| | Chromium 116 | `win11-arm`  | 2025-04-23 |                                 | | ||||
| | Edge 135     | `win11-arm`  | 2025-04-23 |                                 | | ||||
| | Chromium 135 | `linux-arm`  | 2025-04-23 |                                 | | ||||
| | Konqueror 22 | `linux-arm`  | 2025-04-23 | `text/rtf`, files not supported | | ||||
| 
 | ||||
| Windows and macOS tests were run against Excel, while Linux tests were run | ||||
| against Gnumeric. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
|  | ||||
| @ -41,10 +41,11 @@ production sites. | ||||
| 
 | ||||
| This demo was last tested in the following environments: | ||||
| 
 | ||||
| | Browser     | Date       | `localForage` | | ||||
| |:------------|:-----------|:--------------| | ||||
| | Chrome 131  | 2024-12-31 | `1.10.0`      | | ||||
| | Safari 18.2 | 2024-12-31 | `1.10.0`      | | ||||
| | Browser      | Date       | `localForage` | | ||||
| |:-------------|:-----------|:--------------| | ||||
| | Chromium 131 | 2024-12-31 | `1.10.0`      | | ||||
| | Safari 18.2  | 2024-12-31 | `1.10.0`      | | ||||
| | Konqueror 22 | 2025-04-23 | `1.10.0`      | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -113,10 +114,11 @@ function SheetJSLocalForage() { | ||||
| 
 | ||||
| This demo was last tested in the following environments: | ||||
| 
 | ||||
| | Browser     | Date       | DexieJS  | | ||||
| |:------------|:-----------|:---------| | ||||
| | Chrome 131  | 2024-12-31 | `4.0.10` | | ||||
| | Safari 18.2 | 2024-12-31 | `4.0.10` | | ||||
| | Browser      | Date       | DexieJS  | | ||||
| |:-------------|:-----------|:---------| | ||||
| | Chromium 131 | 2024-12-31 | `4.0.10` | | ||||
| | Safari 18.2  | 2024-12-31 | `4.0.10` | | ||||
| | Konqueror 22 | 2025-04-23 | `4.0.10` | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
|  | ||||
| @ -23,9 +23,9 @@ tables with a content script and a background script. | ||||
| 
 | ||||
| This demo was tested in the following deployments: | ||||
| 
 | ||||
| | Platform    | Date       | | ||||
| |:------------|:-----------| | ||||
| | Chrome 131  | 2025-01-02 | | ||||
| | Platform     | Date       | | ||||
| |:-------------|:-----------| | ||||
| | Chromium 131 | 2025-01-02 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
|  | ||||
| @ -283,10 +283,11 @@ Joseph Biden,46 | ||||
| 
 | ||||
| Each browser demo was tested in the following environments: | ||||
| 
 | ||||
| | Browser     | Date       | | ||||
| |:------------|:-----------| | ||||
| | Chrome 126  | 2024-07-18 | | ||||
| | Safari 17.4 | 2024-07-18 | | ||||
| | Browser      | Date       | | ||||
| |:-------------|:-----------| | ||||
| | Chromium 126 | 2024-07-18 | | ||||
| | Safari 17.4  | 2024-07-18 | | ||||
| | Konqueror 22 | 2025-04-23 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
|  | ||||
| @ -191,13 +191,14 @@ const worker = new Worker( | ||||
| 
 | ||||
| Each browser demo was tested in the following environments: | ||||
| 
 | ||||
| | Browser     | Date       | Comments                                | | ||||
| |:------------|:-----------|:----------------------------------------| | ||||
| | Chrome 131  | 2024-12-31 |                                         | | ||||
| | Edge 131    | 2024-12-31 |                                         | | ||||
| | Safari 17.5 | 2024-12-31 | File System Access API is not supported | | ||||
| | Brave 1.63  | 2024-12-31 | File System Access API is not supported | | ||||
| | Firefox 133 | 2024-12-31 | File System Access API is not supported | | ||||
| | Browser      | Date       | Comments                                | | ||||
| |:-------------|:-----------|:----------------------------------------| | ||||
| | Chromium 131 | 2024-12-31 |                                         | | ||||
| | Edge 131     | 2024-12-31 |                                         | | ||||
| | Safari 17.5  | 2024-12-31 | File System Access API is not supported | | ||||
| | Brave 1.63   | 2024-12-31 | File System Access API is not supported | | ||||
| | Konqueror 22 | 2025-04-23 | File System Access API is not supported | | ||||
| | Firefox 133  | 2024-12-31 | File System Access API is not supported | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
|  | ||||
| @ -848,10 +848,13 @@ This demo was tested in the following deployments: | ||||
| | Architecture | Hermes   | Date       | | ||||
| |:-------------|:---------|:-----------| | ||||
| | `darwin-x64` | `0.13.0` | 2025-03-31 | | ||||
| | `darwin-arm` | `0.13.0` | 2025-04-23 | | ||||
| | `win11-x64`  | `0.13.0` | 2024-12-20 | | ||||
| | `win11-arm`  | `0.13.0` | 2025-02-23 | | ||||
| | `linux-x64`  | `0.13.0` | 2025-04-21 | | ||||
| 
 | ||||
| When this demo was last tested, `jsvu` did not support `linux-arm`. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| Due to limitations of the standalone binary, this demo will encode a test file | ||||
|  | ||||
| @ -38,7 +38,7 @@ This demo was tested in the following environments: | ||||
| |:-------------|:----------|:-----------| | ||||
| | `darwin-x64` | `5020015` | 2025-03-31 | | ||||
| | `darwin-arm` | `d2d30df` | 2025-02-13 | | ||||
| | `win11-x64`  | `d2d30df` | 2024-12-19 | | ||||
| | `win11-x64`  | `5020015` | 2025-04-23 | | ||||
| | `win11-arm`  | `5020015` | 2025-02-23 | | ||||
| | `linux-x64`  | `5020015` | 2025-04-21 | | ||||
| | `linux-arm`  | `5020015` | 2025-02-15 | | ||||
|  | ||||
| @ -324,7 +324,7 @@ This demo was tested in the following deployments: | ||||
| |:-------------|:--------|:-----------| | ||||
| | `darwin-x64` | `1.3.6` | 2025-03-31 | | ||||
| | `darwin-arm` | `1.3.5` | 2025-02-13 | | ||||
| | `win11-x64`  | `1.3.5` | 2024-12-19 | | ||||
| | `win11-x64`  | `1.3.6` | 2025-04-23 | | ||||
| | `win11-arm`  | `1.3.5` | 2025-02-23 | | ||||
| | `linux-x64`  | `1.3.5` | 2025-01-09 | | ||||
| | `linux-arm`  | `1.3.5` | 2025-02-15 | | ||||
|  | ||||
| @ -178,7 +178,7 @@ This demo was tested in the following deployments: | ||||
| |:-------------|:---------|:-----------| | ||||
| | `darwin-x64` | `3.2.9`  | 2025-03-31 | | ||||
| | `darwin-arm` | `3.2.9`  | 2025-03-30 | | ||||
| | `win11-x64`  | `3.2.8`  | 2024-12-19 | | ||||
| | `win11-x64`  | `3.2.9`  | 2025-04-23 | | ||||
| | `win11-arm`  | `3.2.9`  | 2025-02-23 | | ||||
| | `linux-x64`  | `3.2.8`  | 2025-01-10 | | ||||
| | `linux-arm`  | `3.2.9`  | 2025-02-15 | | ||||
|  | ||||
| @ -83,6 +83,7 @@ ExtendScript Toolkit 3.5 is available as a standalone download for Windows. | ||||
|  - Chrome 26+ (including Android 6.0+) | ||||
|  - Safari 8+ (Desktop) and Safari 10+ (iOS) | ||||
|  - Edge 13-18 and 79+ | ||||
|  - Konqueror 22 | ||||
|  - FF Latest | ||||
| 
 | ||||
| The automated browser tests seek to test the latest patch version of each major | ||||
|  | ||||
| @ -381,6 +381,7 @@ In previous runs, tests passed in: | ||||
| - Android Browser versions starting from 5.1 | ||||
| - Safari macOS versions starting from 6 | ||||
| - Edge 13 - 18 and versions starting from 79 | ||||
| - Konqueror 22 | ||||
| 
 | ||||
| Sauce Labs has removed many legacy browser versions over the years. SheetJS LLC | ||||
| still maintains testing infrastructure for legacy deployments. Questions about | ||||
|  | ||||
| @ -198,7 +198,8 @@ const config = { | ||||
|     { | ||||
|       src: "https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js", | ||||
|       async: true | ||||
|     } | ||||
|     }, | ||||
|     "/shim.js" | ||||
|   ], | ||||
|   stylesheets: [ | ||||
|     { | ||||
|  | ||||
| @ -47,7 +47,6 @@ | ||||
|     ], | ||||
|     "development": [ | ||||
|       "last 1 chrome version", | ||||
|       "last 1 firefox version", | ||||
|       "last 1 safari version" | ||||
|     ] | ||||
|   } | ||||
|  | ||||
| @ -9,7 +9,7 @@ export default defineTransformer({ | ||||
|   extensions: ['.xlsx'], | ||||
|   parse (_id: string, rawContent: string) { | ||||
|     const wb = read(readFileSync(resolve("./content/" + _id.slice(8)))); | ||||
|     const body = wb.SheetNames.map(name => ({ name, data: utils.sheet_to_json(wb.Sheets[name])})); | ||||
|     const body = wb.SheetNames.map(name => ({ name, data: utils.sheet_to_json(wb.Sheets[name]!)})); | ||||
|     return { _id, body }; | ||||
|   } | ||||
| }); | ||||
							
								
								
									
										2
									
								
								docz/static/shim.js
									
									
									
									
									
										Normal file
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										2
									
								
								docz/static/shim.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,2 @@ | ||||
| /* workaround for legacy browsers */ | ||||
| if(!Object.hasOwn) Object.hasOwn = function(o, v) { return o.hasOwnProperty(v); }; | ||||
| @ -87,7 +87,7 @@ function exportFile(type: string): void { | ||||
|     utils.book_append_sheet(wb, workBook.value[sheet], sheet); | ||||
|   }); | ||||
| 
 | ||||
|   writeFile(wb, `sheet.${type}`); | ||||
|   writeFile(wb, `SheetJSVTL.${type}`); | ||||
| } | ||||
| 
 | ||||
| function selectSheet(sheet: string): void { | ||||
|  | ||||
							
								
								
									
										39
									
								
								tests/data/alasql-bun.sh
									
									
									
									
									
										Executable file
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										39
									
								
								tests/data/alasql-bun.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,39 @@ | ||||
| #!/bin/bash | ||||
| # https://docs.sheetjs.com/docs/demos/data/alasql/#nodejs-example | ||||
| 
 | ||||
| cd /tmp | ||||
| mkdir sheetjs-alasql | ||||
| cd sheetjs-alasql | ||||
| cat <<EOF >package.json | ||||
| { | ||||
|   "overrides": { | ||||
|     "xlsx": "https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz" | ||||
|   } | ||||
| } | ||||
| EOF | ||||
| 
 | ||||
| bun i --save alasql@3.1.0 https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz | ||||
| 
 | ||||
| curl -L -O https://docs.sheetjs.com/pres.numbers | ||||
| 
 | ||||
| cat <<EOF >SheetJSAlaSQL.js | ||||
| const { promise: alasql } = require("alasql"); | ||||
| 
 | ||||
| (async() => { | ||||
|   /* read data from spreadsheet to JS */ | ||||
|   const data = await alasql(\` | ||||
|     SELECT \\\`Name\\\`, \\\`Index\\\` | ||||
|       FROM XLSX("pres.numbers", {autoExt:false}) | ||||
|       WHERE \\\`Index\\\` < 45 | ||||
|   \`); | ||||
|   console.log(data); | ||||
| 
 | ||||
|   /* write data from JS to spreadsheet */ | ||||
|   data.push({ Name: "SheetJS Dev", Index: 47 }); | ||||
|   await alasql(\`SELECT * INTO XLSX("SheetJSAlaSQL1.xlsx") FROM ?\`, [data]); | ||||
| })(); | ||||
| EOF | ||||
| 
 | ||||
| bun run SheetJSAlaSQL.js | ||||
| 
 | ||||
| bunx xlsx-cli SheetJSAlaSQL1.xlsx | ||||
							
								
								
									
										39
									
								
								tests/data/alasql-node.sh
									
									
									
									
									
										Executable file
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										39
									
								
								tests/data/alasql-node.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,39 @@ | ||||
| #!/bin/bash | ||||
| # https://docs.sheetjs.com/docs/demos/data/alasql/#nodejs-example | ||||
| 
 | ||||
| cd /tmp | ||||
| mkdir sheetjs-alasql | ||||
| cd sheetjs-alasql | ||||
| cat <<EOF >package.json | ||||
| { | ||||
|   "overrides": { | ||||
|     "xlsx": "https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz" | ||||
|   } | ||||
| } | ||||
| EOF | ||||
| 
 | ||||
| npm i --save alasql@3.1.0 https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz | ||||
| 
 | ||||
| curl -L -O https://docs.sheetjs.com/pres.numbers | ||||
| 
 | ||||
| cat <<EOF >SheetJSAlaSQL.js | ||||
| const { promise: alasql } = require("alasql"); | ||||
| 
 | ||||
| (async() => { | ||||
|   /* read data from spreadsheet to JS */ | ||||
|   const data = await alasql(\` | ||||
|     SELECT \\\`Name\\\`, \\\`Index\\\` | ||||
|       FROM XLSX("pres.numbers", {autoExt:false}) | ||||
|       WHERE \\\`Index\\\` < 45 | ||||
|   \`); | ||||
|   console.log(data); | ||||
| 
 | ||||
|   /* write data from JS to spreadsheet */ | ||||
|   data.push({ Name: "SheetJS Dev", Index: 47 }); | ||||
|   await alasql(\`SELECT * INTO XLSX("SheetJSAlaSQL1.xlsx") FROM ?\`, [data]); | ||||
| })(); | ||||
| EOF | ||||
| 
 | ||||
| node SheetJSAlaSQL.js | ||||
| 
 | ||||
| npx xlsx-cli SheetJSAlaSQL1.xlsx | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user