mdx cleanup in preparation for v2

- use autolinks (e.g <https://sheetjs.com> -> https://sheetjs.com)
- move <summary> blocks to separate lines
This commit is contained in:
SheetJS 2024-04-08 00:47:04 -04:00
parent 24eaed9f6b
commit 92e3c5aa72
116 changed files with 586 additions and 331 deletions

@ -21,6 +21,55 @@ $ make spell # spell check (.spelling custom dictionary)
$ make graph # build format graph and legend
```
### Documentation Markup
The original documentation used [GFM](https://github.github.com/gfm/).
Pages currently use MDX v1.
<details>
<summary><b>MDX Notes</b> (click to show)</summary>
**Multi-line tags**
Markdown and MDX v1 accept the following:
```
<details><summary><b>MDX Notes</b> (click to show)</summary>
Note
</details>
```
This is no longer valid in MDX v2. The `<summary>` part must be separated:
```
<details>
<summary><b>MDX Notes</b> (click to show)</summary>
Note
</details>
```
**Shortlinks**
Markdown and MDX v1 support shortlinks:
```
Scripts are available at <https://cdn.sheetjs.com>
```
This is no longer valid in MDX v2. Autolinks should be used:
```
Scripts are available at https://cdn.sheetjs.com
```
</details>
### Engine Compatibility Tables
`docz/src/data/engines.xls` is an XLML workbook that controls the compatibility

@ -11,7 +11,7 @@ import CodeBlock from '@theme/CodeBlock';
# Standalone Browser Scripts
Each standalone release script is available at <https://cdn.sheetjs.com/>.
Each standalone release script is available at https://cdn.sheetjs.com/.
<p>The current version is {current} and can be referenced as follows:</p>
@ -33,7 +33,7 @@ new versions are released!
A number of services host older versions of the SheetJS libraries. Due to
syncing issues, they are generally out of date.
**The SheetJS CDN** <https://cdn.sheetjs.com/> **is the authoritative source**
**The SheetJS CDN** https://cdn.sheetjs.com/ **is the authoritative source**
**for SheetJS scripts**
:::
@ -54,7 +54,8 @@ A slimmer build is generated at `dist/xlsx.mini.min.js`. Compared to full build:
- no support for XLSB / XLS / Lotus 1-2-3 / SpreadsheetML 2003 / Numbers
- node stream utils removed
<details><summary><b>How to integrate the mini build</b> (click to show)</summary>
<details>
<summary><b>How to integrate the mini build</b> (click to show)</summary>
Replace references to `xlsx.full.min.js` with `xlsx.mini.min.js`. Starting from
scratch, a single script tag should be added at the top of the HTML page:

@ -13,7 +13,7 @@ import CodeBlock from '@theme/CodeBlock';
# Frameworks and Bundlers
Each standalone release package is available at <https://cdn.sheetjs.com/>. The
Each standalone release package is available at https://cdn.sheetjs.com/. The
NodeJS package is designed to be used with frameworks and bundlers. It is a
proper ECMAScript Module release which can be optimized with developer tools.
@ -88,7 +88,7 @@ but the registry is out of date. The latest version on that registry is 0.18.5
This is a known registry bug
**The SheetJS CDN** <https://cdn.sheetjs.com/> **is the authoritative source**
**The SheetJS CDN** https://cdn.sheetjs.com/ **is the authoritative source**
**for SheetJS modules.**
For existing projects, the easiest approach is to uninstall and reinstall:

@ -12,7 +12,7 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import CodeBlock from '@theme/CodeBlock';
Package tarballs are available on <https://cdn.sheetjs.com>.
Package tarballs are available on https://cdn.sheetjs.com.
<p><a href={`https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}>https://cdn.sheetjs.com/xlsx-{current}/xlsx-{current}.tgz</a> is the URL for version {current}</p>
@ -77,7 +77,7 @@ but the registry is out of date. The latest version on that registry is 0.18.5
This is a known registry bug
**The SheetJS CDN** <https://cdn.sheetjs.com/> **is the authoritative source**
**The SheetJS CDN** https://cdn.sheetjs.com/ **is the authoritative source**
**for SheetJS modules.**
For existing projects, the easiest approach is to uninstall and reinstall:

@ -11,7 +11,7 @@ import CodeBlock from '@theme/CodeBlock';
# AMD (define)
Each standalone release script is available at <https://cdn.sheetjs.com/>.
Each standalone release script is available at https://cdn.sheetjs.com/.
`xlsx.full.min.js` supports AMD with name `xlsx` out of the box.

@ -10,7 +10,7 @@ import current from '/version.js';
# ExtendScript
Each standalone release script is available at <https://cdn.sheetjs.com/>.
Each standalone release script is available at https://cdn.sheetjs.com/.
`xlsx.extendscript.js` is an ExtendScript build for Photoshop and InDesign.

@ -13,7 +13,7 @@ import CodeBlock from '@theme/CodeBlock';
# Deno
Module scripts and type definitions are available at <https://cdn.sheetjs.com/>.
Module scripts and type definitions are available at https://cdn.sheetjs.com/.
Using the URL imports, `deno run` will automatically download scripts and types:
@ -72,7 +72,7 @@ and the types URLs should be updated at the same time:
The official Deno registry is out of date. This is a registry bug.
**The SheetJS CDN** <https://cdn.sheetjs.com/> **is the authoritative source**
**The SheetJS CDN** https://cdn.sheetjs.com/ **is the authoritative source**
**for SheetJS modules.**
:::

@ -12,7 +12,7 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import CodeBlock from '@theme/CodeBlock';
Package tarballs are available on <https://cdn.sheetjs.com>.
Package tarballs are available on https://cdn.sheetjs.com.
<p><a href={`https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}>https://cdn.sheetjs.com/xlsx-{current}/xlsx-{current}.tgz</a> is the URL for version {current}</p>

@ -8,7 +8,7 @@ title: Installation
import DocCardList from '@theme/DocCardList';
import {useCurrentSidebarCategory} from '@docusaurus/theme-common';
<https://cdn.sheetjs.com> is the primary software distribution site. Please
https://cdn.sheetjs.com is the primary software distribution site. Please
read the installation instructions for your use case:
<ul>{useCurrentSidebarCategory().items.map((item, index) => {

@ -43,7 +43,7 @@ sequenceDiagram
## Acquire Data
The raw data is available in JSON form[^1]. It has been mirrored at
<https://sheetjs.com/data/executive.json>
https://sheetjs.com/data/executive.json
### Raw Data
@ -54,7 +54,8 @@ const url = "https://sheetjs.com/data/executive.json";
const raw_data = await (await fetch(url)).json();
```
<details><summary><b>Code Explanation</b> (click to show)</summary>
<details>
<summary><b>Code Explanation</b> (click to show)</summary>
`fetch` is a low-level API for downloading data from an endpoint. It separates
the network step from the response parsing step.
@ -176,7 +177,8 @@ the code in more detail.
:::
<details><summary><b>Code Explanation</b> (click to show)</summary>
<details>
<summary><b>Code Explanation</b> (click to show)</summary>
**Verifying if a person was a US President**
@ -234,7 +236,8 @@ represents the start of the first presidential term.
prez.forEach(row => row.start = row.terms.find(term => term.type === "prez").start);
```
<details><summary><b>Code Explanation</b> (click to show)</summary>
<details>
<summary><b>Code Explanation</b> (click to show)</summary>
**Finding the first presidential term**
@ -304,7 +307,8 @@ At this point, each row in the `prez` array has a `start` property. Since the
prez.sort((l,r) => l.start.localeCompare(r.start));
```
<details><summary><b>Code Explanation</b> (click to show)</summary>
<details>
<summary><b>Code Explanation</b> (click to show)</summary>
**Comparator Functions and Relative Ordering in JavaScript**
@ -370,7 +374,8 @@ const rows = prez.map(row => ({
}));
```
<details><summary><b>Code Explanation</b> (click to show)</summary>
<details>
<summary><b>Code Explanation</b> (click to show)</summary>
**Wrangling One Data Row**
@ -492,7 +497,8 @@ cell styling and frozen rows.
:::
<details><summary><b>Changing Header Names</b> (click to show)</summary>
<details>
<summary><b>Changing Header Names</b> (click to show)</summary>
By default, `json_to_sheet` creates a worksheet with a header row. In this case,
the headers come from the JS object keys: "name" and "birthday".
@ -506,7 +512,8 @@ XLSX.utils.sheet_add_aoa(worksheet, [["Name", "Birthday"]], { origin: "A1" });
</details>
<details><summary><b>Changing Column Widths</b> (click to show)</summary>
<details>
<summary><b>Changing Column Widths</b> (click to show)</summary>
Some of the names are longer than the default column width. Column widths are
set by setting the `"!cols"` worksheet property.[^7]
@ -581,7 +588,7 @@ function Presidents() { return ( <button onClick={async () => {
}}><b>Click to Generate file!</b></button> ); }
```
<https://sheetjs.com/pres.html> is a hosted version of this demo.
https://sheetjs.com/pres.html is a hosted version of this demo.
## Run the Demo Locally
@ -730,7 +737,8 @@ Native `fetch` support was added in NodeJS 18. For older versions of NodeJS,
the script will throw an error `fetch is not defined`. A third-party library
like `axios` presents a similar API for fetching data:
<details><summary><b>Example using axios</b> (click to show)</summary>
<details>
<summary><b>Example using axios</b> (click to show)</summary>
Install the dependencies:
@ -793,7 +801,8 @@ This script will write a new file `Presidents.xlsx` in the same folder.
:::
<details><summary><b>Other Server-Side Platforms</b> (click to show)</summary>
<details>
<summary><b>Other Server-Side Platforms</b> (click to show)</summary>
<Tabs>
<TabItem value="deno" label="Deno">
@ -1161,7 +1170,7 @@ see a preview of the data. The Numbers app can open the file.
</TabItem>
</Tabs>
[^1]: <https://theunitedstates.io/congress-legislators/executive.json> is the
[^1]: https://theunitedstates.io/congress-legislators/executive.json is the
original location of the example dataset. The contributors to the dataset
dedicated the content to the public domain.
[^2]: See ["The Executive Branch"](https://github.com/unitedstates/congress-legislators#the-executive-branch)

@ -42,7 +42,7 @@ sequenceDiagram
## Download File
The raw data is available in a XLS workbook[^1]. It has been mirrored at
<https://sheetjs.com/data/PortfolioSummary.xls>
https://sheetjs.com/data/PortfolioSummary.xls
:::info pass
@ -60,7 +60,8 @@ const url = "https://sheetjs.com/data/PortfolioSummary.xls";
const file = await (await fetch(url)).arrayBuffer();
```
<details><summary><b>Code Explanation</b> (click to show)</summary>
<details>
<summary><b>Code Explanation</b> (click to show)</summary>
`fetch` is a low-level API for downloading data from an endpoint. It separates
the network step from the response parsing step.
@ -211,7 +212,8 @@ recommended to use utility functions to present JS-friendly data structures.
The `sheet_to_html` utility function[^7] generates an HTML table from worksheet
objects. The following live example shows the first 20 rows of data in a table:
<details><summary><b>Live example</b> (click to show)</summary>
<details>
<summary><b>Live example</b> (click to show)</summary>
:::info pass
@ -306,7 +308,8 @@ will have holes in cells `A14:A16` (written as `null`):
[null, "Q4", 609.1, 25.6, 423, 20.9, 8.1, 2.9, 1040.2, 39.6]
```
<details><summary><b>Live example</b> (click to show)</summary>
<details>
<summary><b>Live example</b> (click to show)</summary>
```jsx live
function SheetJSAoAHoles() {
@ -346,7 +349,8 @@ the code in more detail.
:::
<details><summary><b>Code Explanation</b> (click to show)</summary>
<details>
<summary><b>Code Explanation</b> (click to show)</summary>
**Analyzing every row in the dataset**
@ -455,7 +459,8 @@ After post-processing, the rows now have proper year fields:
[2013, "Q4", 609.1, 25.6, 423, 20.9, 8.1, 2.9, 1040.2, 39.6]
```
<details><summary><b>Live example</b> (click to show)</summary>
<details>
<summary><b>Live example</b> (click to show)</summary>
```jsx live
function SheetJSAoAFilled() {
@ -491,7 +496,8 @@ is between 2007 and 2023, `Array#filter` can be used to select the rows:
const rows = raw_data.filter(r => r[0] >= 2007 && r[0] <= 2023);
```
<details><summary><b>Live example</b> (click to show)</summary>
<details>
<summary><b>Live example</b> (click to show)</summary>
```jsx live
function SheetJSAoAFiltered() {
@ -526,7 +532,8 @@ Looking at the headers:
The desired data is in column `I`. The column index can be calculated using
`XLSX.utils.decode_col`[^11].
<details><summary><b>Column Index calculation</b> (click to show)</summary>
<details>
<summary><b>Column Index calculation</b> (click to show)</summary>
```jsx live
function SheetJSDecodeCol() {
@ -565,7 +572,8 @@ following row:
{ "FY": 2016, "FQ": "Q1", "total": 1220.3 }
```
<details><summary><b>Live example</b> (click to show)</summary>
<details>
<summary><b>Live example</b> (click to show)</summary>
```jsx live
function SheetJSObjects() {
@ -617,7 +625,7 @@ best presented in simple HTML tables[^12]:
### Vanilla JS
<https://sheetjs.com/sl.html> is a hosted version of this demo.
https://sheetjs.com/sl.html is a hosted version of this demo.
Without a framework, HTML table row elements can be programmatically created
with `document.createElement` and added to the table body element. For example,

@ -19,8 +19,8 @@ deployments and use cases.
## Installation
<https://cdn.sheetjs.com> is the primary software distribution site. Please
read the installation instructions for your use case:
https://cdn.sheetjs.com is the primary software distribution site. Please read
the installation instructions for your use case:
<ul>{useCurrentSidebarCategory().items.map((item, index) => {
if(item.label != "Installation") return "";

@ -382,7 +382,8 @@ function aoa_average_of_key(aoo, key) {
}
```
<details><summary><b>Live Demo</b> (click to show)</summary>
<details>
<summary><b>Live Demo</b> (click to show)</summary>
```jsx live
function SheetJSAoOAverageKey() {
@ -437,7 +438,8 @@ function ws_average_of_col(ws, C) {
}
```
<details><summary><b>Live Demo</b> (click to show)</summary>
<details>
<summary><b>Live Demo</b> (click to show)</summary>
```jsx live
function SheetJSDenseAverageKey() {
@ -511,7 +513,8 @@ The van Reeken array mean can be implemented in one line of JavaScript code:
for(var n = 1, mean = 0; n <= x.length; ++n) mean += (x[n-1] - mean)/n;
```
<details><summary><b>Math details</b> (click to show)</summary>
<details>
<summary><b>Math details</b> (click to show)</summary>
Let $M[x;m] = \frac{1}{m}\sum_{i=1}^{m}x_m$ be the mean of the first $m$ elements. Then:
@ -592,7 +595,8 @@ function aoa_mean_of_key(aoo, key) {
}
```
<details><summary><b>Live Demo</b> (click to show)</summary>
<details>
<summary><b>Live Demo</b> (click to show)</summary>
```jsx live
function SheetJSAoOMeanKey() {
@ -647,7 +651,8 @@ function ws_mean_of_col(ws, C) {
}
```
<details><summary><b>Live Demo</b> (click to show)</summary>
<details>
<summary><b>Live Demo</b> (click to show)</summary>
```jsx live
function SheetJSDenseMeanKey() {

@ -118,7 +118,7 @@ flowchart LR
The demo builds a model for predicting MPG from Horsepower data. It:
- fetches <https://sheetjs.com/data/cd.xls>
- fetches https://sheetjs.com/data/cd.xls
- parses the data with the SheetJS `read`[^4] method
- selects the first worksheet[^5] and converts to CSV using `sheet_to_csv`[^6]
- generates a blob URL from the CSV text
@ -126,7 +126,8 @@ The demo builds a model for predicting MPG from Horsepower data. It:
- builds a model and trains with `fitDataset`[^8]
- predicts MPG from a set of sample inputs and displays results in a table
<details><summary><b>Live Demo</b> (click to show)</summary>
<details>
<summary><b>Live Demo</b> (click to show)</summary>
:::caution pass

@ -32,7 +32,8 @@ Demos for various libraries are included in separate pages:
Modern JavaScript math and statistics libraries typically use `Float64Array` or
`Float32Array` objects to efficiently store data variables.
<details><summary><b>Technical details</b> (click to show)</summary>
<details>
<summary><b>Technical details</b> (click to show)</summary>
Under the hood, `ArrayBuffer` objects represent raw binary data. "Typed arrays"
such as `Float64Array` and `Float32Array` are objects designed for efficient
@ -140,7 +141,8 @@ for(let R = 1; R < aoa.length; ++R) {
}
```
<details><summary><b>Live Demo</b> (click to show)</summary>
<details>
<summary><b>Live Demo</b> (click to show)</summary>
This example fetches and parses [`iris.xlsx`](pathname:///typedarray/iris.xlsx).
The first worksheet is processed and the new data and mapping are printed.
@ -293,7 +295,8 @@ XLSX.utils.sheet_add_aoa(ws, [ arr ], { origin: "B1" });
![Typed Array to single row with title](pathname:///typedarray/ta-row.png)
<details open><summary><b>Live Demo</b> (click to hide)</summary>
<details open>
<summary><b>Live Demo</b> (click to hide)</summary>
In this example, two typed arrays are exported. `aoa_to_sheet` creates the
worksheet and `sheet_add_aoa` will add the data to the sheet.
@ -375,7 +378,8 @@ XLSX.utils.sheet_add_aoa(ws, arr, { origin: "A2" });
![Typed Array to single column with title](pathname:///typedarray/ta-col.png)
<details open><summary><b>Live Demo</b> (click to hide)</summary>
<details open>
<summary><b>Live Demo</b> (click to hide)</summary>
In this example, two typed arrays are exported. `aoa_to_sheet` creates the
worksheet and `sheet_add_aoa` will add the data to the sheet.

@ -314,7 +314,8 @@ export default function SheetJSKaiokenAoO() {
}
```
<details open><summary><b>How to run the example</b> (click to hide)</summary>
<details open>
<summary><b>How to run the example</b> (click to hide)</summary>
<Tabs groupId="starter">
<TabItem name="vite" value="ViteJS">
@ -410,7 +411,7 @@ and test the page.
</TabItem>
</Tabs>
When the page loads, the app will fetch <https://sheetjs.com/pres.xlsx> and
When the page loads, the app will fetch https://sheetjs.com/pres.xlsx and
display the data from the first worksheet in a TABLE. The "Export XLSX" button
will generate a workbook that can be opened in a spreadsheet editor.
@ -468,7 +469,8 @@ export default function SheetJSKaiokenHTML() {
}
```
<details open><summary><b>How to run the example</b> (click to hide)</summary>
<details open>
<summary><b>How to run the example</b> (click to hide)</summary>
<Tabs groupId="starter">
<TabItem name="vite" value="ViteJS">
@ -564,7 +566,7 @@ and test the page.
</TabItem>
</Tabs>
When the page loads, the app will fetch <https://sheetjs.com/pres.xlsx> and
When the page loads, the app will fetch https://sheetjs.com/pres.xlsx and
display the data from the first worksheet in a TABLE. The "Export XLSX" button
will generate a workbook that can be opened in a spreadsheet editor.

@ -317,7 +317,8 @@ export default function SheetJSReactAoO() {
}
```
<details open><summary><b>How to run the example</b> (click to hide)</summary>
<details open>
<summary><b>How to run the example</b> (click to hide)</summary>
<Tabs groupId="starter">
<TabItem name="vite" value="ViteJS">
@ -541,7 +542,7 @@ and test the page.
</TabItem>
</Tabs>
When the page loads, the app will fetch <https://sheetjs.com/pres.xlsx> and
When the page loads, the app will fetch https://sheetjs.com/pres.xlsx and
display the data from the first worksheet in a TABLE. The "Export XLSX" button
will generate a workbook that can be opened in a spreadsheet editor.
@ -600,7 +601,8 @@ export default function SheetJSReactHTML() {
}
```
<details open><summary><b>How to run the example</b> (click to hide)</summary>
<details open>
<summary><b>How to run the example</b> (click to hide)</summary>
<Tabs groupId="starter">
<TabItem name="vite" value="ViteJS">
@ -709,7 +711,7 @@ and test the page.
</TabItem>
</Tabs>
When the page loads, the app will fetch <https://sheetjs.com/pres.xlsx> and
When the page loads, the app will fetch https://sheetjs.com/pres.xlsx and
display the data from the first worksheet in a TABLE. The "Export XLSX" button
will generate a workbook that can be opened in a spreadsheet editor.

@ -414,7 +414,8 @@ export class AppComponent {
</TabItem>
</Tabs>
<details open><summary><b>How to run the example</b> (click to hide)</summary>
<details open>
<summary><b>How to run the example</b> (click to hide)</summary>
:::note Tested Deployments
@ -607,7 +608,8 @@ export class AppComponent {
</TabItem>
</Tabs>
<details open><summary><b>How to run the example</b> (click to hide)</summary>
<details open>
<summary><b>How to run the example</b> (click to hide)</summary>
:::note Tested Deployments
@ -1034,7 +1036,7 @@ will have an `ng-version` attribute.
npm run build
```
[^1]: The main website for Angular versions 2-16 is <https://angular.io/> . The project moved to a new domain <https://angular.dev/> during the Angular 17 launch.
[^1]: The main website for Angular versions 2-16 is https://angular.io/ . The project moved to a new domain https://angular.dev/ during the Angular 17 launch.
[^2]: See `OnInit` in the [Angular 2-16 docs](https://angular.io/api/core/OnInit) or [Angular 17 docs](https://angular.dev/guide/components/lifecycle#ngoninit)
[^3]: See [`ngFor`](https://angular.io/api/common/NgFor) in the Angular 2-16 docs.
[^4]: See [`@for`](https://angular.dev/api/core/@for) in the Angular 17 docs.

@ -345,7 +345,8 @@ function exportFile() {
</template>
```
<details open><summary><b>How to run the example</b> (click to hide)</summary>
<details open>
<summary><b>How to run the example</b> (click to hide)</summary>
<Tabs groupId="starter">
<TabItem name="vite" value="ViteJS">
@ -505,7 +506,8 @@ function exportFile() {
</template>
```
<details open><summary><b>How to run the example</b> (click to hide)</summary>
<details open>
<summary><b>How to run the example</b> (click to hide)</summary>
<Tabs groupId="starter">
<TabItem name="vite" value="ViteJS">

@ -128,7 +128,8 @@ function exportFile() {
</main>
```
<details open><summary><b>How to run the example</b> (click to hide)</summary>
<details open>
<summary><b>How to run the example</b> (click to hide)</summary>
:::note Tested Deployments
@ -227,7 +228,8 @@ function exportFile() {
</main>
```
<details open><summary><b>How to run the example</b> (click to hide)</summary>
<details open>
<summary><b>How to run the example</b> (click to hide)</summary>
:::note Tested Deployments

@ -235,7 +235,8 @@ $scope.exportSheetJS = function() {
};
```
<details><summary><b>Complete Example</b> (click to show)</summary>
<details>
<summary><b>Complete Example</b> (click to show)</summary>
1) Save the following to `index.html`:
@ -336,7 +337,8 @@ The HTML table can be directly exported with [`table_to_book`](/docs/api/utiliti
};
```
<details><summary><b>Complete Example</b> (click to show)</summary>
<details>
<summary><b>Complete Example</b> (click to show)</summary>
1) Save the following to `index.html`:

@ -63,7 +63,7 @@ The official Google CDN does not have the newest releases of Dojo Toolkit
**This is a known Google CDN bug.**
The script <https://docs.sheetjs.com/dojo/dojo.js> was fetched from the official
The script https://docs.sheetjs.com/dojo/dojo.js was fetched from the official
`1.17.3` uncompressed release artifact[^1].
:::
@ -201,5 +201,5 @@ function export_all_data_from_store(store) {
}
```
[^1]: All Dojo Toolkit releases are available at <https://download.dojotoolkit.org/>. The mirrored `dojo.js` corresponds to the `1.17.3` uncompressed script <http://download.dojotoolkit.org/release-1.17.3/dojo.js.uncompressed.js>.
[^1]: All Dojo Toolkit releases are available at https://download.dojotoolkit.org/. The mirrored `dojo.js` corresponds to the `1.17.3` uncompressed script http://download.dojotoolkit.org/release-1.17.3/dojo.js.uncompressed.js.
[^2]: See [`dojo/store`](https://dojotoolkit.org/reference-guide/dojo/store.html) in the Dojo Toolkit documentation.

@ -48,7 +48,8 @@ The SheetJS testing grid still includes IE and should work.
The modern upload and download strategies are not available in older versions of
IE, but there are approaches using ActiveX or Flash.
<details><summary><b>Complete Example</b> (click to show)</summary>
<details>
<summary><b>Complete Example</b> (click to show)</summary>
This demo includes all of the support files for the Flash and ActiveX methods.
@ -76,7 +77,8 @@ npx -y http-server .
</details>
<details><summary><b>Other Live Demos</b> (click to show)</summary>
<details>
<summary><b>Other Live Demos</b> (click to show)</summary>
:::caution pass
@ -85,10 +87,10 @@ demo pages should be downloaded and hosted using a simple HTTP server.
:::
<https://oss.sheetjs.com/sheetjs/ajax.html> uses XMLHttpRequest to download test
https://oss.sheetjs.com/sheetjs/ajax.html uses XMLHttpRequest to download test
files and convert to CSV
<https://oss.sheetjs.com/sheetjs/> demonstrates reading files with `FileReader`.
https://oss.sheetjs.com/sheetjs/ demonstrates reading files with `FileReader`.
Older versions of IE do not support HTML5 File API but do support Base64.
@ -214,7 +216,8 @@ This demo was tested in the following environments:
:::
<details><summary><b>Full Exposition</b> (click to show)</summary>
<details>
<summary><b>Full Exposition</b> (click to show)</summary>
**State**

@ -128,7 +128,8 @@ document.getElementById("xport").onclick = async() => {
For ParcelJS version 1, the entire script should be copied to `index.js` and the
main `index.html` page should load the `index.js` script:
<details><summary><b>ParcelJS v1 example</b> (click to show)</summary>
<details>
<summary><b>ParcelJS v1 example</b> (click to show)</summary>
```html title="index.html"
<body>

@ -45,7 +45,8 @@ Complete Examples are included [in the "Dojo" demo](/docs/demos/frontend/dojo)
Snowpack works with no caveats.
<details><summary><b>Complete Example</b> (click to show)</summary>
<details>
<summary><b>Complete Example</b> (click to show)</summary>
:::note Tested Deployments
@ -166,7 +167,8 @@ Click on "Click here to export" to generate a file.
WMR works with no caveats.
<details><summary><b>Complete Example</b> (click to show)</summary>
<details>
<summary><b>Complete Example</b> (click to show)</summary>
:::note Tested Deployments

@ -71,7 +71,7 @@ const wb = XLSX.read(ab);
## Browser Demos
When the page is accessed, the browser will attempt to download <https://sheetjs.com/pres.numbers>
When the page is accessed, the browser will attempt to download https://sheetjs.com/pres.numbers
and read the workbook. The old table will be replaced with a table whose
contents match the first worksheet. The table is generated using the SheetJS
`sheet_to_html` method[^2]
@ -108,9 +108,10 @@ req.onload = function(e) {
req.send();
```
<details><summary><b>Live Download demo</b> (click to show)</summary>
<details>
<summary><b>Live Download demo</b> (click to show)</summary>
This demo uses `XMLHttpRequest` to download <https://sheetjs.com/pres.numbers>
This demo uses `XMLHttpRequest` to download https://sheetjs.com/pres.numbers
and show the data in an HTML table.
```jsx live
@ -160,9 +161,10 @@ fetch(url).then(function(res) {
});
```
<details><summary><b>Live Download demo</b> (click to show)</summary>
<details>
<summary><b>Live Download demo</b> (click to show)</summary>
This demo uses `fetch` to download <https://sheetjs.com/pres.numbers> and show
This demo uses `fetch` to download https://sheetjs.com/pres.numbers and show
the data in an HTML table.
```jsx live
@ -254,9 +256,10 @@ async function workbook_dl_axios(url) {
}
```
<details><summary><b>Live Download demo</b> (click to show)</summary>
<details>
<summary><b>Live Download demo</b> (click to show)</summary>
This demo uses `axios` to download <https://sheetjs.com/pres.numbers> and show
This demo uses `axios` to download https://sheetjs.com/pres.numbers and show
the data in an HTML table.
:::caution pass
@ -315,9 +318,10 @@ superagent
});
```
<details><summary><b>Live Download demo</b> (click to show)</summary>
<details>
<summary><b>Live Download demo</b> (click to show)</summary>
This demo uses `superagent` to download <https://sheetjs.com/pres.numbers> and
This demo uses `superagent` to download https://sheetjs.com/pres.numbers and
show the data in an HTML table.
:::caution pass
@ -384,7 +388,8 @@ https.get('https://sheetjs.com/pres.numbers', function(res) {
});
```
<details><summary><b>Complete Example</b> (click to show)</summary>
<details>
<summary><b>Complete Example</b> (click to show)</summary>
:::note Tested Environments
@ -431,7 +436,8 @@ async function parse_from_url(url) {
}
```
<details><summary><b>Complete Example</b> (click to show)</summary>
<details>
<summary><b>Complete Example</b> (click to show)</summary>
:::note Tested Environments
@ -510,7 +516,8 @@ request(url, {encoding: null}, function(err, res, data) {
});
```
<details><summary><b>Complete Example</b> (click to show)</summary>
<details>
<summary><b>Complete Example</b> (click to show)</summary>
:::note Tested Environments
@ -552,7 +559,8 @@ async function workbook_dl_axios(url) {
}
```
<details><summary><b>Complete Example</b> (click to show)</summary>
<details>
<summary><b>Complete Example</b> (click to show)</summary>
:::note Tested Environments

@ -114,7 +114,7 @@ fdata.append('file', file);
This demo explores a number of APIs and libraries for making POST requests. Each
approach will upload data stored in `FormData` objects.
This snippet uses `XMLHttpRequest` to upload data to <https://s2c.sheetjs.com>:
This snippet uses `XMLHttpRequest` to upload data to https://s2c.sheetjs.com:
```js title="Uploading Form Data with XMLHttpRequest"
/* send data using XMLHttpRequest */
@ -126,7 +126,7 @@ req.send(fdata);
## Browser Demos
When the upload button is clicked, the browser will build up a new workbook,
generate a XLSX file, upload it to <https://s2c.sheetjs.com> and show the
generate a XLSX file, upload it to https://s2c.sheetjs.com and show the
response. If the process was successful, a HTML table will be displayed
:::note Tested Deployments
@ -142,7 +142,7 @@ Each browser demo was tested in the following environments:
#### Test Server
The <https://s2c.sheetjs.com> service is currently hosted on Deno Deploy. The
The https://s2c.sheetjs.com service is currently hosted on Deno Deploy. The
["Deno Deploy" demo](/docs/demos/cloud/deno#demo) covers the exact steps for
deploying the service.
@ -162,7 +162,8 @@ req.open("POST", "https://s2c.sheetjs.com", true);
req.send(fdata);
```
<details><summary><b>Complete Code Snippet</b> (click to show)</summary>
<details>
<summary><b>Complete Code Snippet</b> (click to show)</summary>
```js title="SheetJS + XMLHttpRequest example"
/* create sample SheetJS workbook object */
@ -190,10 +191,11 @@ req.send(fdata);
</details>
<details><summary><b>Live demo</b> (click to show)</summary>
<details>
<summary><b>Live demo</b> (click to show)</summary>
This demo starts from an array of arrays of data. When the button is clicked, a
workbook file will be generated and uploaded to <https://s2c.sheetjs.com>. The
workbook file will be generated and uploaded to https://s2c.sheetjs.com. The
service will return a HTML table.
```jsx live
@ -263,7 +265,8 @@ function SheetJSXHRUL() {
fetch("https://s2c.sheetjs.com", { method: "POST", body: fdata });
```
<details><summary><b>Complete Code Snippet</b> (click to show)</summary>
<details>
<summary><b>Complete Code Snippet</b> (click to show)</summary>
```js title="SheetJS + fetch example"
/* create sample SheetJS workbook object */
@ -289,9 +292,10 @@ fetch("https://s2c.sheetjs.com", { method: "POST", body: fdata });
</details>
<details><summary><b>Live demo</b> (click to show)</summary>
<details>
<summary><b>Live demo</b> (click to show)</summary>
This demo uses `fetch` to upload data to <https://s2c.sheetjs.com>. It will parse
This demo uses `fetch` to upload data to https://s2c.sheetjs.com. It will parse
the workbook and return an HTML table.
```jsx live
@ -364,7 +368,8 @@ Uploading form data is nearly identical to the `fetch` example:
axios("https://s2c.sheetjs.com", { method: "POST", body: fdata });
```
<details><summary><b>Complete Code Snippet</b> (click to show)</summary>
<details>
<summary><b>Complete Code Snippet</b> (click to show)</summary>
```js title="SheetJS + axios example"
/* create sample SheetJS workbook object */
@ -390,9 +395,10 @@ axios("https://s2c.sheetjs.com", { method: "POST", data: fdata });
</details>
<details><summary><b>Live demo</b> (click to show)</summary>
<details>
<summary><b>Live demo</b> (click to show)</summary>
This demo uses `axios` to upload data to <https://s2c.sheetjs.com>. It will parse
This demo uses `axios` to upload data to https://s2c.sheetjs.com. It will parse
the workbook and return an HTML table.
:::caution pass
@ -472,7 +478,8 @@ The `send` method accepts a `FormData` object as the first argument:
superagent.post("https://s2c.sheetjs.com").send(fd);
```
<details><summary><b>Complete Code Snippet</b> (click to show)</summary>
<details>
<summary><b>Complete Code Snippet</b> (click to show)</summary>
```js title="SheetJS + superagent example"
/* create sample SheetJS workbook object */
@ -498,9 +505,10 @@ superagent.post("https://s2c.sheetjs.com").send(fd);
</details>
<details><summary><b>Live demo</b> (click to show)</summary>
<details>
<summary><b>Live demo</b> (click to show)</summary>
This demo uses `superagent` to upload data to <https://s2c.sheetjs.com>. It will
This demo uses `superagent` to upload data to https://s2c.sheetjs.com. It will
parse the workbook and return an HTML table.
:::caution pass
@ -587,9 +595,10 @@ This demo was tested in the following environments:
:::
<details><summary><b>Complete Example</b> (click to show)</summary>
<details>
<summary><b>Complete Example</b> (click to show)</summary>
This demo uses `fetch` to upload data to <https://s2c.sheetjs.com>. It will parse
This demo uses `fetch` to upload data to https://s2c.sheetjs.com. It will parse
the workbook and return data in CSV rows.
1) Install the [SheetJS NodeJS module](/docs/getting-started/installation/nodejs):
@ -709,9 +718,10 @@ This demo was tested in the following environments:
:::
<details><summary><b>Complete Example</b> (click to show)</summary>
<details>
<summary><b>Complete Example</b> (click to show)</summary>
This demo uses `request` to upload data to <https://s2c.sheetjs.com>. It will
This demo uses `request` to upload data to https://s2c.sheetjs.com. It will
parse the workbook and return data in CSV rows.
1) Install the [SheetJS NodeJS module](/docs/getting-started/installation/nodejs)

@ -151,7 +151,7 @@ npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz express
node SheetJSExpressCSV.js
```
4) Test POST requests using <https://sheetjs.com/pres.numbers> . The following
4) Test POST requests using https://sheetjs.com/pres.numbers . The following
commands should be run in a new terminal window:
```bash

@ -123,7 +123,7 @@ curl -LO https://docs.sheetjs.com/drash/SheetJSDrash.ts
deno run --allow-net SheetJSDrash.ts
```
3) Download the test file <https://sheetjs.com/pres.numbers>
3) Download the test file https://sheetjs.com/pres.numbers
4) Open `http://localhost:7262/` in your browser.

@ -151,7 +151,7 @@ app.listen(3000);
bun run src/SheetJSElysia.ts
```
5) Test POST requests using <https://sheetjs.com/pres.numbers> . The following
5) Test POST requests using https://sheetjs.com/pres.numbers . The following
commands should be run in a new terminal window:
```bash

@ -209,7 +209,7 @@ npx @nestjs/cli start
:::
8) Test POST requests using <https://sheetjs.com/pres.numbers> . The following
8) Test POST requests using https://sheetjs.com/pres.numbers . The following
commands should be run in a new terminal window:
```bash

@ -166,7 +166,7 @@ npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz fastify
node SheetJSFastify.js
```
3) Test POST requests using <https://sheetjs.com/pres.numbers> . The following
3) Test POST requests using https://sheetjs.com/pres.numbers . The following
commands should be run in a new terminal window:
```bash

@ -120,7 +120,8 @@ That approach is not explored in this demo.
:::
<details><summary><b>Complete Example</b> (click to show)</summary>
<details>
<summary><b>Complete Example</b> (click to show)</summary>
:::note Tested Deployments

@ -162,7 +162,8 @@ added and exposed in a script.
[`pstextractor.js`](pathname:///pst/pstextractor.js) is loaded in the demo page.
<details><summary><b>Build instructions</b> (click to show)</summary>
<details>
<summary><b>Build instructions</b> (click to show)</summary>
1) Initialize a new NodeJS project and install the dependency:

@ -378,7 +378,7 @@ const concat_RS = (stream) => new Promise((res, rej) => {
| `gmail.com` | `imap.gmail.com` |
| `fastmail.com` | `imap.fastmail.com` |
4) Download <https://sheetjs.com/pres.numbers>. Using a different account, send
4) Download https://sheetjs.com/pres.numbers. Using a different account, send
an email to the test account and attach the file. At the end of this step, the
test account should have an email in the inbox that has an attachment.

@ -50,7 +50,8 @@ sequenceDiagram
end
```
<details open><summary><b>Key Steps</b> (click to hide)</summary>
<details open>
<summary><b>Key Steps</b> (click to hide)</summary>
1) Launch the headless browser and load the target site.
@ -66,7 +67,7 @@ sequenceDiagram
</details>
This demo exports data from <https://sheetjs.com/demos/table>.
This demo exports data from https://sheetjs.com/demos/table.
:::note pass
@ -355,7 +356,8 @@ 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`).
<details><summary><b>Integration Details and Demo</b> (click to show)</summary>
<details>
<summary><b>Integration Details and Demo</b> (click to show)</summary>
The steps are marked in the comments:

@ -107,7 +107,8 @@ const workbook = XLSX.utils.table_to_book(doc);
XLSX.writeFile(workbook, "SheetJSDOM.xlsx");
```
<details><summary><b>Complete Demo</b> (click to show)</summary>
<details>
<summary><b>Complete Demo</b> (click to show)</summary>
:::note Tested Deployments
@ -147,7 +148,8 @@ the following patches were needed:
- TABLE `rows` property (explained above)
- TR `cells` property (explained above)
<details><summary><b>Complete Demo</b> (click to show)</summary>
<details>
<summary><b>Complete Demo</b> (click to show)</summary>
:::note Tested Deployments
@ -200,7 +202,8 @@ Object.defineProperty(tbl.__proto__, "innerHTML", { get: function() {
}});
```
<details><summary><b>Complete Demo</b> (click to show)</summary>
<details>
<summary><b>Complete Demo</b> (click to show)</summary>
:::note Tested Deployments
@ -243,7 +246,8 @@ can be shimmed, but it is strongly recommended to use a more compliant library.
[`SheetJSCheerio.js`](pathname:///dom/SheetJSCheerio.js) implements the missing
features to ensure that SheetJS DOM methods can process TABLE elements.
<details><summary><b>Complete Demo</b> (click to show)</summary>
<details>
<summary><b>Complete Demo</b> (click to show)</summary>
:::note Tested Deployments
@ -314,7 +318,8 @@ const workbook = XLSX.utils.table_to_book(tbl);
XLSX.writeFile(workbook, "SheetJSDenoDOM.xlsx");`}
</CodeBlock>
<details><summary><b>Complete Demo</b> (click to show)</summary>
<details>
<summary><b>Complete Demo</b> (click to show)</summary>
:::note Tested Deployments

@ -131,5 +131,5 @@ npm run dev
5) Load the displayed URL (typically `http://localhost:5173`) in a web browser.
When the page loads, it will try to fetch <https://sheetjs.com/pres.numbers>
When the page loads, it will try to fetch https://sheetjs.com/pres.numbers
and display the data. Click "Export" to generate a workbook.

@ -367,7 +367,7 @@ curl -L -o src/App.tsx https://docs.sheetjs.com/gdg/App.tsx
![glide-data-grid initial view](pathname:///gdg/pre.png)
The demo downloads and processes <https://sheetjs.com/pres.numbers>.
The demo downloads and processes https://sheetjs.com/pres.numbers.
6) Make some changes to the grid data.

@ -173,7 +173,7 @@ npm start
#### Testing
5) When the page loads, it will fetch <https://sheetjs.com/pres.numbers>, parse
5) When the page loads, it will fetch https://sheetjs.com/pres.numbers, parse
with SheetJS, and load the data in the data grid.
6) Click one of the "export" buttons to export the grid data to file.

@ -225,4 +225,4 @@ curl -L -o src/App.tsx https://docs.sheetjs.com/mui/dg/App.tsx
npm run dev
```
When the page loads, it will fetch and process <https://sheetjs.com/pres.numbers>
When the page loads, it will fetch and process https://sheetjs.com/pres.numbers

@ -67,7 +67,8 @@ The [AngularJS demo](/docs/demos/frontend/angularjs) covers more general strateg
[Click here for a live integration demo.](pathname:///angularjs/ui-grid.html)
<details><summary><b>Notes</b> (click to show)</summary>
<details>
<summary><b>Notes</b> (click to show)</summary>
The library does not provide any way to modify the import button, so the demo
includes a simple directive for a File Input HTML element. It also includes a

@ -168,7 +168,7 @@ The `nunjucks` plugin was included by default in Lume version 1.
:::
2) Download <https://sheetjs.com/pres.xlsx> and place in a `_data` subfolder:
2) Download https://sheetjs.com/pres.xlsx and place in a `_data` subfolder:
```bash
mkdir -p _data

@ -255,7 +255,7 @@ npm i --save gatsby-transformer-excel@4 gatsby-source-filesystem@4
:::
5) Make a `src/data` directory, download <https://sheetjs.com/pres.xlsx>, and
5) Make a `src/data` directory, download https://sheetjs.com/pres.xlsx, and
move the downloaded file into the new folder:
```bash

@ -271,7 +271,7 @@ document.body.appendChild(elt);
curl -LO https://docs.sheetjs.com/esbuild/build.mjs
```
5) Download <https://sheetjs.com/pres.numbers> to the project folder:
5) Download https://sheetjs.com/pres.numbers to the project folder:
```bash
curl -LO https://sheetjs.com/pres.numbers

@ -227,7 +227,7 @@ npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}
curl -O https://docs.sheetjs.com/vitejs/vite.config.ts
```
3) Make a `data` folder and download <https://sheetjs.com/pres.xlsx> :
3) Make a `data` folder and download https://sheetjs.com/pres.xlsx :
```bash
mkdir -p data

@ -285,7 +285,7 @@ loader.raw = true;
module.exports = loader;
```
6) Download <https://sheetjs.com/pres.xlsx> and save to the `data` folder:
6) Download https://sheetjs.com/pres.xlsx and save to the `data` folder:
```bash
curl -L -o data/pres.xlsx https://sheetjs.com/pres.xlsx

@ -296,7 +296,7 @@ When the build finishes, the terminal will display a URL like:
The server is listening on that URL. Open the link in a web browser.
3) Download <https://sheetjs.com/pres.xlsx> and move to the `content` folder.
3) Download https://sheetjs.com/pres.xlsx and move to the `content` folder.
```bash
curl -L -o content/pres.xlsx https://sheetjs.com/pres.xlsx
@ -485,7 +485,8 @@ The data is stored in the `body` property of the final object.
NuxtJS modules are the main mechanism for adding transformers to the pipeline.
<details><summary><b>Module Details</b> (click to show)</summary>
<details>
<summary><b>Module Details</b> (click to show)</summary>
Due to the structure of the NuxtJS system, modules must be defined in separate
script files. The module script is expected to export a module configured with
@ -612,7 +613,7 @@ When the build finishes, the terminal will display a URL like:
The server is listening on that URL. Open the link in a web browser.
3) Download <https://sheetjs.com/pres.xlsx> and move to the `content` folder.
3) Download https://sheetjs.com/pres.xlsx and move to the `content` folder.
```bash
curl -L -o content/pres.xlsx https://sheetjs.com/pres.xlsx

@ -207,7 +207,7 @@ row. This neatly skips the first header row.
React Native versions starting from `0.72.0`[^5] support binary data in `fetch`.
This snippet downloads and parses <https://sheetjs.com/pres.xlsx>:
This snippet downloads and parses https://sheetjs.com/pres.xlsx:
```js
/* fetch data into an ArrayBuffer */
@ -376,7 +376,8 @@ If the device asks to trust the computer, tap "Trust" and enter the passcode.
15) Enable developer code signing certificates[^7].
<details open><summary><b>Enabling Code Signing</b> (click to show)</summary>
<details open>
<summary><b>Enabling Code Signing</b> (click to show)</summary>
These instructions were verified against Xcode 15.3.
@ -566,7 +567,8 @@ The following table lists tested file plugins. "OS" lists tested platforms
Due to privacy concerns, apps must request file access. There are special APIs
for accessing data and are subject to change in future platform versions.
<details><summary><b>Technical Details</b> (click to show)</summary>
<details>
<summary><b>Technical Details</b> (click to show)</summary>
**iOS**
@ -698,7 +700,8 @@ is the continuation of other libraries that date back to 2016.
The `ascii` type returns an array of numbers corresponding to the raw bytes.
A `Uint8Array` from the data is compatible with the `buffer` type.
<details><summary><b>Reading and Writing snippets</b> (click to hide)</summary>
<details>
<summary><b>Reading and Writing snippets</b> (click to hide)</summary>
_Reading Data_
@ -779,7 +782,8 @@ is a filesystem API that uses modern iOS and Android development patterns.
The `base64` encoding returns strings compatible with the `base64` type:
<details><summary><b>Reading and Writing snippets</b> (click to hide)</summary>
<details>
<summary><b>Reading and Writing snippets</b> (click to hide)</summary>
_Reading Data_
@ -839,7 +843,8 @@ The [`expo-document-picker`](#expo-document-picker) snippet makes a local copy.
The `EncodingType.Base64` encoding is compatible with `base64` type.
<details><summary><b>Reading and Writing snippets</b> (click to hide)</summary>
<details>
<summary><b>Reading and Writing snippets</b> (click to hide)</summary>
_Reading Data_
@ -1197,7 +1202,7 @@ npx react-native doctor
:::
8) Download <https://sheetjs.com/pres.numbers> and open the Downloads folder.
8) Download https://sheetjs.com/pres.numbers and open the Downloads folder.
9) Click and drag `pres.numbers` from the Downloads folder into the simulator.
@ -1277,7 +1282,7 @@ cd ios; pod install; cd -
npx react-native run-ios
```
17) Download <https://sheetjs.com/pres.numbers> and open the Downloads folder.
17) Download https://sheetjs.com/pres.numbers and open the Downloads folder.
18) In the simulator, click the Home icon to return to the home screen.
@ -1353,7 +1358,7 @@ If the device asks to allow USB debugging, tap "Allow".
npx react-native run-android
```
30) Download <https://sheetjs.com/pres.numbers> on the device.
30) Download https://sheetjs.com/pres.numbers on the device.
31) Switch back to the "SheetJSRN" app.
@ -1442,7 +1447,7 @@ npx react-native run-ios
If the build fails, some troubleshooting notes are included in the "iOS Device
Testing" part of the [Fetch Demo](#fetch-demo) (step 17).
41) Download <https://sheetjs.com/pres.numbers> on the device.
41) Download https://sheetjs.com/pres.numbers on the device.
42) Switch back to the "SheetJSRN" app.

@ -116,7 +116,8 @@ function get_url_for_filename(filename: string): string {
Due to privacy concerns, apps must request file access. There are special APIs
for accessing data and are subject to change in future platform versions.
<details><summary><b>Technical Details</b> (click to show)</summary>
<details>
<summary><b>Technical Details</b> (click to show)</summary>
**Android**
@ -296,7 +297,8 @@ npx -p nativescript ns doctor android
In the last macOS test, the following output was displayed:
<details open><summary><b>Expected output</b> (click to hide)</summary>
<details open>
<summary><b>Expected output</b> (click to hide)</summary>
<pre>
<span {...g}></span> Getting environment information{'\n'}
@ -322,7 +324,8 @@ npx -p nativescript ns doctor ios
In the last macOS test, the following output was displayed:
<details open><summary><b>Expected output</b> (click to hide)</summary>
<details open>
<summary><b>Expected output</b> (click to hide)</summary>
<pre>
<span {...g}></span> Getting environment information{'\n'}
@ -776,7 +779,8 @@ npx -p nativescript ns run android
If the Android emulators are closed and an Android device is connected, the last
command will build an APK and install on the device.
<details open><summary><b>Android Device Testing</b> (click to hide)</summary>
<details open>
<summary><b>Android Device Testing</b> (click to hide)</summary>
When the app launches, if the SheetJS library is loaded and if the device is
connected to the Internet, a list of Presidents should be displayed.

@ -356,7 +356,7 @@ export default defineComponent({
To test that reading works:
- Download <https://sheetjs.com/pres.numbers>
- Download https://sheetjs.com/pres.numbers
- In the simulator, click the Home icon to return to the home screen
- Click on the "Files" icon
- Click and drag `pres.numbers` from a Finder window into the simulator.

@ -137,7 +137,8 @@ iOS development is only supported on macOS.
:::
<details><summary><b>Installation Notes</b> (click to show)</summary>
<details>
<summary><b>Installation Notes</b> (click to show)</summary>
CapacitorJS requires Java 17.

@ -220,7 +220,8 @@ Run `flutter doctor` and confirm the following items are checked:
(the actual version numbers may differ)
<details open><summary><b>Installation Notes</b> (click to hide)</summary>
<details open>
<summary><b>Installation Notes</b> (click to hide)</summary>
:::note pass
@ -313,7 +314,8 @@ cd sheetjs_flutter
3) Start the Android emulator.
<details open><summary><b>Details</b> (click to hide)</summary>
<details open>
<summary><b>Details</b> (click to hide)</summary>
**Android Studio**
@ -360,7 +362,8 @@ emulator -avd Pixel_3a_API_34
flutter run
```
<details><summary><b>If emulator is not detected</b> (click to show)</summary>
<details>
<summary><b>If emulator is not detected</b> (click to show)</summary>
In some test runs, `flutter run` did not automatically detect the emulator.
@ -440,7 +443,7 @@ curl -L -o lib/main.dart https://docs.sheetjs.com/flutter/main.dart
flutter run
```
The app fetches <https://sheetjs.com/pres.numbers>, parses, converts data to an
The app fetches https://sheetjs.com/pres.numbers, parses, converts data to an
array of arrays, and presents the data in a Flutter `Table` widget.
:::caution pass
@ -485,7 +488,7 @@ Searching for `minSdkVersion` should reveal the following line:
flutter run
```
The app fetches <https://sheetjs.com/pres.numbers>, parses, converts data to an
The app fetches https://sheetjs.com/pres.numbers, parses, converts data to an
array of arrays, and presents the data in a Flutter `Table` widget.
### Android Device
@ -564,8 +567,8 @@ The list should include the device:
flutter run -d SheetPad
```
[^1]: <https://dart.dev/> is the official site for the Dart Programming Language.
[^2]: <https://flutter.dev/> is the official site for the Flutter Framework.
[^1]: https://dart.dev/ is the official site for the Dart Programming Language.
[^2]: https://flutter.dev/ is the official site for the Flutter Framework.
[^3]: [The `flutter_js` package](https://pub.dev/packages/flutter_js) is hosted on the Dart package repository.
[^4]: See [the dedicated "Swift + JavaScriptCore" demo](/docs/demos/engines/jsc) for more details.
[^5]: See [the dedicated "C + QuickJS" demo](/docs/demos/engines/quickjs) for more details.

@ -308,7 +308,8 @@ This demo was tested in the following environments:
0) Read the Wails "Getting Started" guide[^14] and install dependencies.
<details><summary><b>Installation Notes</b> (click to show)</summary>
<details>
<summary><b>Installation Notes</b> (click to show)</summary>
Wails will require:

@ -354,7 +354,8 @@ This demo was tested in the following environments:
0) Read Tauri "Getting Started" guide and install prerequisites.[^16]
<details><summary><b>Installation Notes</b> (click to show)</summary>
<details>
<summary><b>Installation Notes</b> (click to show)</summary>
At a high level, the following software is required for building Tauri apps:
@ -625,7 +626,7 @@ or
The following features should be manually verified:
- When it is loaded, the app will download <https://sheetjs.com/pres.numbers>
- When it is loaded, the app will download https://sheetjs.com/pres.numbers
and display the data in a table.
- Clicking "Save Data" will show a save dialog. After selecting a path and name,
the app will write a file. That file can be opened in a spreadsheet editor.

@ -204,7 +204,8 @@ This demo was tested in the following environments:
The app core state will be the HTML table. Reading files will add the table to
the window. Writing files will parse the table into a spreadsheet.
<details><summary><b>Installation Notes</b> (click to show)</summary>
<details>
<summary><b>Installation Notes</b> (click to show)</summary>
NeutralinoJS uses `portable-file-dialogs`[^12] to show open and save dialogs. On
Linux, Zenity or KDialog are require.

@ -133,7 +133,8 @@ function update_state(wb) {
The demos use native `View` elements from `react-native` to display data.
<details><summary><b>Explanation</b> (click to show)</summary>
<details>
<summary><b>Explanation</b> (click to show)</summary>
Since some spreadsheets may have empty cells between cells containing data,
looping over the rows may skip values!
@ -404,7 +405,8 @@ used to switch the NodeJS version.
:::
<details><summary><b>Installation Notes</b> (click to show)</summary>
<details>
<summary><b>Installation Notes</b> (click to show)</summary>
When the demo was last tested, a PowerShell script installed dependencies:
@ -629,7 +631,7 @@ When this demo was last tested on Windows 11 ARM, the build failed.
</TabItem>
</Tabs>
9) Download <https://sheetjs.com/pres.xlsx>.
9) Download https://sheetjs.com/pres.xlsx.
10) In the app, click "Click here to Open File!" and use the file picker to
select `pres.xlsx` . The app will refresh and display the data from the file.
@ -912,7 +914,7 @@ Close the running app from the dock and close the Metro terminal window.
curl -LO https://docs.sheetjs.com/reactnative/rnm/App.tsx
```
10) Download <https://sheetjs.com/pres.xlsx> to the Downloads folder.
10) Download https://sheetjs.com/pres.xlsx to the Downloads folder.
#### Development

@ -222,7 +222,7 @@ local NodeJS platform.
:::
4) Download the test file <https://sheetjs.com/pres.numbers>:
4) Download the test file https://sheetjs.com/pres.numbers:
```bash
curl -o pres.numbers https://sheetjs.com/pres.numbers

@ -111,7 +111,7 @@ This demo was last tested in the following deployments:
0) Install Deno.[^6]
1) Download the test file <https://sheetjs.com/pres.numbers>:
1) Download the test file https://sheetjs.com/pres.numbers:
```bash
curl -o pres.numbers https://sheetjs.com/pres.numbers

@ -124,7 +124,7 @@ This demo was tested in the following deployments:
:::
0) Download the test file <https://sheetjs.com/pres.numbers>:
0) Download the test file https://sheetjs.com/pres.numbers:
```bash
curl -o pres.numbers https://sheetjs.com/pres.numbers
@ -437,7 +437,7 @@ Versions `0.75.1` and `0.82.0` are known to work.
cargo build --release --bin sheet2csv
```
5) Download the test file <https://sheetjs.com/pres.numbers>:
5) Download the test file https://sheetjs.com/pres.numbers:
```bash
curl -o pres.numbers https://sheetjs.com/pres.numbers

@ -11,10 +11,11 @@ import TabItem from '@theme/TabItem';
### Generating Tables
This example will fetch <https://sheetjs.com/data/cd.xls>, scan the columns of the
This example will fetch https://sheetjs.com/data/cd.xls, scan the columns of the
first worksheet to determine data types, and generate 6 PostgreSQL statements.
<details><summary><b>Explanation</b> (click to show)</summary>
<details>
<summary><b>Explanation</b> (click to show)</summary>
The relevant `generate_sql` function takes a worksheet name and a table name:

@ -90,7 +90,8 @@ dropping tables with `dropTableIfExists`[^9].
The array of objects can be scanned to determine column names and types.
<details><summary><b>Implementation Details</b> (click to show)</summary>
<details>
<summary><b>Implementation Details</b> (click to show)</summary>
The `aoo_to_knex_table` function:

@ -132,7 +132,8 @@ for(let row of aoo) {
The array of objects can be scanned to determine column names and types. With
the names and types, a `CREATE TABLE` query can be written.
<details><summary><b>Implementation Details</b> (click to show)</summary>
<details>
<summary><b>Implementation Details</b> (click to show)</summary>
The `aoo_to_pg_table` function:
@ -212,7 +213,8 @@ async function aoo_to_pg_table(client, aoo, table_name) {
0) Install and start the PostgreSQL server.
<details><summary><b>Installation Notes</b> (click to show)</summary>
<details>
<summary><b>Installation Notes</b> (click to show)</summary>
On macOS, install the `postgresql` formula with Homebrew:

@ -129,7 +129,8 @@ for(let row of aoo) {
The array of objects can be scanned to determine column names and types. With
the names and types, a `CREATE TABLE` query can be written.
<details><summary><b>Implementation Details</b> (click to show)</summary>
<details>
<summary><b>Implementation Details</b> (click to show)</summary>
The `aoo_to_mariadb_table` function:
@ -203,7 +204,8 @@ async function aoo_to_mariadb_table(conn, aoo, table_name) {
0) Install and start the MariaDB server.
<details><summary><b>Installation Notes</b> (click to show)</summary>
<details>
<summary><b>Installation Notes</b> (click to show)</summary>
On macOS, install the `mariadb` formula with Homebrew:

@ -37,11 +37,12 @@ This demo was tested in the following environments:
## Live Demo
This demo fetches <https://sheetjs.com/pres.numbers>, performs a `SELECT` query
This demo fetches https://sheetjs.com/pres.numbers, performs a `SELECT` query
using the built-in AlaSQL + SheetJS integration, then displays the result. Using
the result as a data source, the demo will write to a new spreadsheet.
<details><summary><b>Demo AlaSQL Queries</b> (click to show)</summary>
<details>
<summary><b>Demo AlaSQL Queries</b> (click to show)</summary>
```sql title="AlaSQL Query for reading data from a workbook"
SELECT `Index`, -- "Index" field is the "Index" column of the sheet
@ -282,7 +283,7 @@ cd alasql
npm i --save alasql@3.1.0 https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}
</CodeBlock>
4) Download the test file <https://sheetjs.com/pres.numbers> :
4) Download the test file https://sheetjs.com/pres.numbers :
```bash
curl -LO https://sheetjs.com/pres.numbers

@ -87,7 +87,8 @@ FerretDB[^10]
1) Start a server on `localhost` (follow official instructions).
<details><summary><b>MongoDB CE Setup</b> (click to show)</summary>
<details>
<summary><b>MongoDB CE Setup</b> (click to show)</summary>
For MongoDB 7.0 Community Edition, the macOS steps required `brew`:

@ -243,7 +243,8 @@ this demo also requires NodeJS version 18 or later.
0) Set up and start a local Redis-compatible server.
<details><summary><b>Redis-compatible servers</b> (click to show)</summary>
<details>
<summary><b>Redis-compatible servers</b> (click to show)</summary>
This demo was last tested on macOS.

@ -135,7 +135,7 @@ md5sum master.zip || md5 master.zip
```
If the download is unavailable, a mirror is available at
<https://docs.sheetjs.com/pouchdb/master.zip>
https://docs.sheetjs.com/pouchdb/master.zip
1) Unzip the `master.zip` file and enter the folder:

@ -119,7 +119,8 @@ function file_to_wb(file, callback) {
}
```
<details><summary><b>FileReaderSync in Web Workers</b> (click to show)</summary>
<details>
<summary><b>FileReaderSync in Web Workers</b> (click to show)</summary>
`FileReaderSync` is only available in Web Workers. It returns an `ArrayBuffer`:
@ -240,7 +241,8 @@ is between `0` and `255`) with `type: "array"`.
[Google Sheets](/docs/demos/extensions/gsheet) follows Java signed data type
conventions. Byte arrays include values from `-128` to `127`.
<details><summary><b>How to Fix Signed Arrays</b> (click to show)</summary>
<details>
<summary><b>How to Fix Signed Arrays</b> (click to show)</summary>
The unsigned value for a negative byte can be calculated with a bitwise AND
(`&`) operation against `0xFF`:
@ -290,7 +292,8 @@ _Writing Files_
XLSX.writeFile(wb, "SheetJS.xlsx");
```
<details><summary><b>Implementation Details</b> (click to show)</summary>
<details>
<summary><b>Implementation Details</b> (click to show)</summary>
Under the hood, it creates a special URL and clicks a link. The library method
includes a few workarounds for legacy browsers
@ -345,7 +348,8 @@ manifest as UUID file names like `01234567-89ab-cdef-0123-456789abcdef` .
For sites using GTM, it is recommended to patch `document.createElement` and
revert after performing the export.
<details><summary><b>GTM Workaround</b> (click to show)</summary>
<details>
<summary><b>GTM Workaround</b> (click to show)</summary>
The workaround is to ensure new `A` elements created by `document.createElement`
have the `target` attribute set to `_blank`.
@ -458,7 +462,8 @@ Some lesser-used browsers do not support File System Access API:
:::
<details><summary><b>Live Example</b> (click to show) </summary>
<details>
<summary><b>Live Example</b> (click to show) </summary>
This live example reads a file then tries to save as XLSX. If the File System
Access API is not supported, the result will be a clear message.
@ -611,7 +616,8 @@ _Writing Files_
IE10 and IE11 support `navigator.msSaveBlob`. `XLSX.writeFile` will use this
method if it is available.
<details><summary><b>Implementation Details</b> (click to show)</summary>
<details>
<summary><b>Implementation Details</b> (click to show)</summary>
**`XLSX.writeFile(wb, "SheetJS.xlsx");`** is roughly equivalent to:
@ -669,7 +675,8 @@ var wb = readFile("sheetjs.numbers");
writeFile(wb, "sheetjs.xlsx");
```
<details><summary><b>Implementation Details</b> (click to show)</summary>
<details>
<summary><b>Implementation Details</b> (click to show)</summary>
**`XLSX.readFile(filepath)`** is equivalent to:
@ -759,7 +766,8 @@ Any Deno script using `XLSX.writeFile` requires the `--allow-write` entitlement.
:::
<details><summary><b>Implementation Details</b> (click to show)</summary>
<details>
<summary><b>Implementation Details</b> (click to show)</summary>
**`XLSX.readFile(filepath)`** is equivalent to:

@ -23,7 +23,7 @@ WebSQL (formally "Web SQL Database") is a popular SQL-based in-browser database
available in Chromium and related browsers including Google Chrome. In practice,
it is powered by SQLite. Many SQLite-compatible queries work as-is in WebSQL.
The public demo <https://sheetjs.com/sql> generates a database from workbook.
The public demo https://sheetjs.com/sql generates a database from workbook.
:::info pass

@ -81,7 +81,7 @@ function localStorage_to_sheet() {
### Live Demo
This example will fetch <https://sheetjs.com/pres.numbers>, fill `localStorage`
This example will fetch https://sheetjs.com/pres.numbers, fill `localStorage`
with rows, then generate a worksheet from the rows and write to a new file.
After saving the exported file, the Local Storage can be inspected in the
@ -96,7 +96,8 @@ is strongly recommended to convert that array to a worksheet directly.
:::
<details><summary><b>Live Demo</b> (click to show)</summary>
<details>
<summary><b>Live Demo</b> (click to show)</summary>
```jsx live
function SheetJStorage() {
@ -199,7 +200,8 @@ function ws_to_localStorage(ws) {
This example fills `localStorage` with 10 random keys and 10 random values,
generates a worksheet from the data and writes to a new file.
<details><summary><b>Live Demo</b> (click to show)</summary>
<details>
<summary><b>Live Demo</b> (click to show)</summary>
```jsx live
function SheetJSRandomStorage() {

@ -144,7 +144,8 @@ var data = [
The APIs typically return nested objects, so the array must be constructed.
<details><summary><b>Salesforce Representation</b> (click to show)</summary>
<details>
<summary><b>Salesforce Representation</b> (click to show)</summary>
The `data` parameter in the callback has a deep structure. Typically one would
set a property in the component and display data in a template:

@ -110,7 +110,8 @@ bb.on('finish', function() {
});
```
<details><summary><b>Complete Code Sample</b> (click to show)</summary>
<details>
<summary><b>Complete Code Sample</b> (click to show)</summary>
This example takes the first uploaded file submitted with the key `upload`,
parses the file and returns the CSV content of the first worksheet.
@ -191,7 +192,8 @@ callback(null, {
});
```
<details><summary><b>Complete Code Sample</b> (click to show)</summary>
<details>
<summary><b>Complete Code Sample</b> (click to show)</summary>
This example creates a sample workbook object and sends the file in the response:
@ -333,7 +335,7 @@ Click "Save" and a new Policy statement should be created.
The site will attempt to download `SheetJSLambda.xlsx`. Save and open the file
to confirm it is valid.
21) Download <https://sheetjs.com/pres.numbers> and make a POST request to the
21) Download https://sheetjs.com/pres.numbers and make a POST request to the
public function URL.
This can be tested on the command line. Change `FUNCTION_URL` in the commands:

@ -126,7 +126,8 @@ option was not required.
Using `@azure/functions`, the handler callback receives a `Request` object.
Uploaded files can be pulled into `ArrayBuffer` objects.
<details><summary><b>Code Snippet</b> (click to show)</summary>
<details>
<summary><b>Code Snippet</b> (click to show)</summary>
This function returns a promise that resolves to an `ArrayBuffer` object:
@ -313,7 +314,7 @@ curl -L -o src/functions/SheetJSAzure.js https://docs.sheetjs.com/azure/index.js
npm start
```
11) In a separate terminal window, download <https://sheetjs.com/pres.numbers>
11) In a separate terminal window, download https://sheetjs.com/pres.numbers
and make a POST request to the dev server:
```bash
@ -390,7 +391,7 @@ Take note of that URL.
#### Remote Test
22) In a separate terminal window, download <https://sheetjs.com/pres.numbers>
22) In a separate terminal window, download https://sheetjs.com/pres.numbers
and make a POST request to the production server. Replace `FUNCTION_URL` with
the Invoke URL from Step 21:
@ -631,7 +632,7 @@ S,h,e,e,t,J,S
The downloaded file is the raw file stored in Azure Blob Storage. To confirm it
is valid, open the file in Excel or another spreadsheet editor.
[^1]: The platform-specific installers are available at <https://learn.microsoft.com/en-us/cli/azure/install-azure-cli>
[^1]: The platform-specific installers are available at https://learn.microsoft.com/en-us/cli/azure/install-azure-cli
[^2]: See [`read` in "Reading Files"](/docs/api/parse-options)
[^3]: See ["Workbook Object" in "SheetJS Data Model"](/docs/csf/book) for more details.
[^4]: See [`sheet_to_csv` in "CSV and Text"](/docs/api/utilities/csv#delimiter-separated-output)

@ -89,7 +89,7 @@ will not be able to display private data.
Any publicly available spreadsheet can be a valid data source. The process will
fetch the data on specified intervals or events.
For this demo, <https://docs.sheetjs.com/pres.xlsx> will be used.
For this demo, https://docs.sheetjs.com/pres.xlsx will be used.
### Action
@ -196,8 +196,8 @@ This was last tested by SheetJS users on 2023 December 04.
:::info pass
<https://github.com/SheetJS/flat-sheet> is an example from a previous test. The
Flat Viewer URL for the repo is <https://flatgithub.com/SheetJS/flat-sheet/>
https://github.com/SheetJS/flat-sheet is an example from a previous test. The
Flat Viewer URL for the repo is https://flatgithub.com/SheetJS/flat-sheet/
:::
@ -329,7 +329,7 @@ jobs:
[^2]: See ["GitHub Actions documentation"](https://docs.github.com/en/actions) in the GitHub documentation.
[^3]: See [`githubocto/flat`](https://github.com/githubocto/flat) repo on GitHub.
[^4]: See [`githubocto/flat-postprocessing`](https://github.com/githubocto/flat-postprocessing) repo on GitHub.
[^5]: The hosted version is available at <https://flatgithub.com/>
[^5]: The hosted version is available at https://flatgithub.com/
[^6]: See ["About billing for GitHub Actions"](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions) in the GitHub documentation.
[^7]: See [`readFile` in "Reading Files"](/docs/api/parse-options)
[^8]: See ["Workbook Object"](/docs/csf/book)

@ -105,13 +105,13 @@ show "SheetJS Spreadsheet Conversion Service":
> ![Screenshot](pathname:///deno/sshot.png)
8) Download the test file <https://sheetjs.com/pres.xlsx>
8) Download the test file https://sheetjs.com/pres.xlsx
9) In the browser window, click "Choose File" and select the downloaded file.
10) Click "Submit". The right panel will show the contents in a HTML TABLE.
11) Open a terminal window and download <https://sheetjs.com/pres.numbers>:
11) Open a terminal window and download https://sheetjs.com/pres.numbers:
```bash
curl -LO https://sheetjs.com/pres.numbers

@ -351,7 +351,7 @@ A valid phone number (for SMS verification) may be required.
:::
1) Open <https://console.cloud.google.com> in a web browser. Review the Google
1) Open https://console.cloud.google.com in a web browser. Review the Google
Cloud Platform Terms of Service.
:::warning pass
@ -408,7 +408,7 @@ The goal of this section is to create a service account and generate a JSON key.
#### Create Service Account
12) Go to <https://console.cloud.google.com>.
12) Go to https://console.cloud.google.com.
13) Click the Project Selector (`:·` icon) and select "SheetJS Test".

@ -244,7 +244,7 @@ The form will look like the screenshot below:
For the purposes of this demo, a sample workspace should be created:
5) Download <https://sheetjs.com/pres.xlsx>
5) Download https://sheetjs.com/pres.xlsx
6) Create a project in Airtable using "Quickly upload". Select "Microsoft Excel"
and select the downloaded file from step 1. Click "Upload", then "Import".

@ -74,7 +74,8 @@ if(!thisFile) { alert("File not found!"); return; }
var workbook = XLSX.readFile(thisFile.absoluteURI);
```
<details open><summary><b>Complete Example</b> (click to hide)</summary>
<details open>
<summary><b>Complete Example</b> (click to hide)</summary>
<Tabs groupId="ccapp">
<TabItem value="photoshop" label="Photoshop">
@ -156,7 +157,8 @@ if(!thisFile) { alert("File not found!"); return; }
XLSX.writeFile(workbook, thisFile.absoluteURI);
```
<details open><summary><b>Complete Example</b> (click to hide)</summary>
<details open>
<summary><b>Complete Example</b> (click to hide)</summary>
<Tabs groupId="ccapp">
<TabItem value="photoshop" label="Photoshop">
@ -278,7 +280,8 @@ const data = cep.fs.readFile(fn.data[0], cep.encoding.Base64);
const wb = XLSX.read(data.data, { type: "base64" });
```
<details open><summary><b>Complete Example</b> (click to hide)</summary>
<details open>
<summary><b>Complete Example</b> (click to hide)</summary>
<Tabs groupId="ccapp">
<TabItem value="indesign" label="InDesign">
@ -292,7 +295,7 @@ If prompted, give administrator privileges.
2) Download and open [`Template.idml`](pathname:///extendscript/Template.idml)
3) Download <https://sheetjs.com/pres.xlsx>
3) Download https://sheetjs.com/pres.xlsx
4) Show the extension (in the menu bar, select Window > Extensions > SheetJS)
@ -327,7 +330,8 @@ const fn = cep.fs.showSaveDialogEx("Save File","",["xlsx"],"SheetJSIDCEP.xlsx");
cep.fs.writeFile(fn.data, b64, cep.encoding.Base64);
```
<details open><summary><b>Complete Example</b> (click to hide)</summary>
<details open>
<summary><b>Complete Example</b> (click to hide)</summary>
<Tabs groupId="ccapp">
<TabItem value="indesign" label="InDesign">
@ -386,7 +390,8 @@ const ab = await file.read({ format: storage.formats.binary });
const wb = XLSX.read(ab);
```
<details open><summary><b>Complete Example</b> (click to hide)</summary>
<details open>
<summary><b>Complete Example</b> (click to hide)</summary>
<Tabs groupId="ccapp">
<TabItem value="indesign" label="InDesign">
@ -404,7 +409,7 @@ Move them to the Scripts Panel folder.
2) Download and open [`Template.idml`](pathname:///extendscript/Template.idml)
3) Download <https://sheetjs.com/pres.xlsx>
3) Download https://sheetjs.com/pres.xlsx
4) In the Scripts Panel, double-click "parse". Select the downloaded `pres.xlsx`
in the file picker.
@ -444,7 +449,8 @@ const file = await ufs.getFileForSaving("SheetJSUXP.xlsx");
await file.write(buf, { data: storage.formats.binary });
```
<details open><summary><b>Complete Example</b> (click to hide)</summary>
<details open>
<summary><b>Complete Example</b> (click to hide)</summary>
<Tabs groupId="ccapp">
<TabItem value="indesign" label="InDesign">

@ -325,9 +325,10 @@ chrome.runtime.onMessage.addListener(function(msg, sender, cb) {
### Bookmark Exporter
<details open><summary><b>Testing</b> (click to hide)</summary>
<details open>
<summary><b>Testing</b> (click to hide)</summary>
0) Open <https://sheetjs.com> in the browser and create a bookmark.
0) Open https://sheetjs.com in the browser and create a bookmark.
1) Click the Extensions icon (puzzle icon to the right of the address bar) and
select "SheetJS Demo".
@ -380,9 +381,10 @@ chrome.bookmarks.getTree(function(res) {
### Table Exporter
<details open><summary><b>Testing</b> (click to hide)</summary>
<details open>
<summary><b>Testing</b> (click to hide)</summary>
1) Open <https://sheetjs.com/demo/table> in the browser.
1) Open https://sheetjs.com/demo/table in the browser.
2) Right-click anywhere in the page and select "SheetJS Demo" > "Export All Tables in Page"

@ -131,7 +131,8 @@ SheetJSImportFileEE[filename_]:=Module[{csv}, (
</TabItem>
</Tabs>
<details open><summary><b>How to run the example</b> (click to hide)</summary>
<details open>
<summary><b>How to run the example</b> (click to hide)</summary>
:::note Tested Deployments
@ -300,7 +301,7 @@ The `\` characters must be doubled.
</TabItem>
</Tabs>
4) Download <https://sheetjs.com/pres.numbers> and save to Downloads folder:
4) Download https://sheetjs.com/pres.numbers and save to Downloads folder:
```bash
cd ~/Downloads/

@ -209,7 +209,7 @@ mkdir -p ~/Documents/MATLAB/
mv xlsx-cli ~/Documents/MATLAB/
```
3) Download <https://sheetjs.com/pres.numbers> and save to Downloads folder:
3) Download https://sheetjs.com/pres.numbers and save to Downloads folder:
```bash
cd ~/Downloads/

@ -25,7 +25,8 @@ var dense_wb = XLSX.read(ab, {dense: true});
var dense_sheet = XLSX.utils.aoa_to_sheet(aoa, {dense: true});
```
<details><summary><b>Historical Note</b> (click to show)</summary>
<details>
<summary><b>Historical Note</b> (click to show)</summary>
The earliest versions of the library aimed for IE6+ compatibility. In early
testing, both in Chrome 26 and in IE6, the most efficient worksheet storage for
@ -53,7 +54,8 @@ take the same arguments as the normal write functions:
"Stream" refers to the NodeJS push streams API.
<details><summary><b>Historical Note</b> (click to show)</summary>
<details>
<summary><b>Historical Note</b> (click to show)</summary>
NodeJS push streams were introduced in 2012. The text streaming methods `to_csv`
and `to_html` are supported in NodeJS v0.10 and later while the object streaming
@ -184,7 +186,8 @@ curl -LO https://sheetjs.com/pres.xlsx
node SheetJSNodeJStream.js pres.xlsx
```
<details><summary><b>Expected Output</b> (click to show)</summary>
<details>
<summary><b>Expected Output</b> (click to show)</summary>
The console will display a list of objects:
@ -250,7 +253,8 @@ For processing large files in the browser, it is strongly encouraged to use Web
Workers. The [Worker demo](/docs/demos/bigdata/worker#streaming-write) includes
examples using the File System Access API.
<details><summary><b>Web Worker Details</b> (click to show)</summary>
<details>
<summary><b>Web Worker Details</b> (click to show)</summary>
Typically, the file and stream processing occurs in the Web Worker. CSV rows
can be sent back to the main thread in the callback:
@ -454,7 +458,7 @@ This demo was last tested on 2024-02-23 against Deno `1.41.0`.
:::
[`SheetJSDenoStream.ts`](pathname:///stream/SheetJSDenoStream.ts) is a small
example script that downloads <https://sheetjs.com/pres.numbers> and prints
example script that downloads https://sheetjs.com/pres.numbers and prints
CSV row objects.
1) Run the script:

@ -81,7 +81,8 @@ Due to limitations of the live code blocks, all of the workers in this section
are in-line. The code is embedded in template literals. For production sites,
typically workers are written in separate JS files.
<details><summary><b>Example</b> (click to show)</summary>
<details>
<summary><b>Example</b> (click to show)</summary>
For example, an in-line worker like
@ -132,7 +133,8 @@ importScripts("https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.mi
For production use, it is highly encouraged to download and host the script.
<details open><summary><b>ECMAScript Module Support</b> (click to hide)</summary>
<details open>
<summary><b>ECMAScript Module Support</b> (click to hide)</summary>
:::note Browser Compatibility
@ -231,11 +233,12 @@ sequenceDiagram
deactivate Page
```
<details><summary><b>Live Demo</b> (click to show)</summary>
<details>
<summary><b>Live Demo</b> (click to show)</summary>
In the following example, the script:
- downloads <https://sheetjs.com/pres.numbers> in a Web Worker
- downloads https://sheetjs.com/pres.numbers in a Web Worker
- loads the SheetJS library and parses the file in the Worker
- generates an HTML string of the first table in the Worker
- sends the string to the main browser context
@ -321,7 +324,8 @@ sequenceDiagram
deactivate Page
```
<details><summary><b>Live Demo</b> (click to show)</summary>
<details>
<summary><b>Live Demo</b> (click to show)</summary>
In the following example, the script:
@ -426,7 +430,8 @@ sequenceDiagram
deactivate Page
```
<details><summary><b>Live Demo</b> (click to show)</summary>
<details>
<summary><b>Live Demo</b> (click to show)</summary>
In the following example, when a file is dropped over the DIV or when the INPUT
element is used to select a file, the script:
@ -548,7 +553,8 @@ sequenceDiagram
```
<details><summary><b>Live Demo</b> (click to show)</summary>
<details>
<summary><b>Live Demo</b> (click to show)</summary>
The following live demo fetches and parses a file in a Web Worker. The script:

@ -757,7 +757,7 @@ mkdir sheetjs-zig
cd sheetjs-zig
```
1) Download Zig 0.11.0 from <https://ziglang.org/download/> and extract to the
1) Download Zig 0.11.0 from https://ziglang.org/download/ and extract to the
project folder.
<Tabs groupId="triple">

@ -77,7 +77,8 @@ context.setObject(data, forKeyedSubscript: "payload" as (NSCopying & NSObjectPro
context.evaluateScript("var wb = XLSX.read(payload, {type:'binary'});");
```
<details><summary><b>Direct Read</b> (click to show)</summary>
<details>
<summary><b>Direct Read</b> (click to show)</summary>
`Uint8Array` data can be passed directly, skipping string encoding and decoding:

@ -176,7 +176,8 @@ This demo was tested in the following deployments:
0) Set the `DOTNET_CLI_TELEMETRY_OPTOUT` environment variable to `1`.
<details open><summary><b>How to disable telemetry</b> (click to hide)</summary>
<details open>
<summary><b>How to disable telemetry</b> (click to hide)</summary>
<Tabs groupId="os">
<TabItem value="unix" label="Linux/MacOS">
@ -209,7 +210,8 @@ Click "OK" in each window (3 windows) and restart your computer.
1) Install .NET
<details><summary><b>Installation Notes</b> (click to show)</summary>
<details>
<summary><b>Installation Notes</b> (click to show)</summary>
For macOS x64 and ARM64, install the `dotnet-sdk` Cask with Homebrew:
@ -224,7 +226,7 @@ For Steam Deck Holo and other Arch Linux x64 distributions, the `dotnet-sdk` and
sudo pacman -Syu dotnet-sdk dotnet-runtime
```
<https://dotnet.microsoft.com/en-us/download/dotnet/6.0> is the official source
https://dotnet.microsoft.com/en-us/download/dotnet/6.0 is the official source
for Windows and ARM64 Linux versions.
</details>
@ -384,7 +386,8 @@ tested platforms are listed below:
9) Build the standalone application.
<details open><summary><b>Tested platforms</b> (click to hide)</summary>
<details open>
<summary><b>Tested platforms</b> (click to hide)</summary>
<Tabs groupId="triple">
<TabItem value="darwin-x64" label="Intel Mac">
@ -451,7 +454,8 @@ The binary name will be `SheetJSJint` or `SheetJSJint.exe` depending on OS.
The last line of the output from Step 9 will print the output folder.
<details open><summary><b>Tested platforms</b> (click to hide)</summary>
<details open>
<summary><b>Tested platforms</b> (click to hide)</summary>
<Tabs groupId="triple">
<TabItem value="darwin-x64" label="Intel Mac">

@ -51,7 +51,8 @@ QuickJS provides a `global` object through `JS_GetGlobalObject`:
JSValue global = JS_GetGlobalObject(ctx);
```
<details><summary><b>Cleanup</b> (click to show)</summary>
<details>
<summary><b>Cleanup</b> (click to show)</summary>
Once finished, programs are expected to cleanup by using `JS_FreeValue` to free
values, `JS_FreeContext` to free the context pointer, and `JS_FreeRuntime` to

@ -382,7 +382,8 @@ The ["Windows Example"](#windows-example) covers `hermes-windows`.
0) Install [dependencies](https://hermesengine.dev/docs/building-and-running/#dependencies)
<details><summary><b>Installation Notes</b> (click to show)</summary>
<details>
<summary><b>Installation Notes</b> (click to show)</summary>
The official guidance[^6] has been verified in macOS and HoloOS (Linux).
@ -542,7 +543,8 @@ contents of the first sheet as CSV rows.
0) Install dependencies.
<details><summary><b>Installation Notes</b> (click to show)</summary>
<details>
<summary><b>Installation Notes</b> (click to show)</summary>
The build sequence requires Python, which can be installed from the official
Windows installer[^7].
@ -573,7 +575,8 @@ should be extracted along with the normal files.
Add the path `c:\src\depot_tools\` to the User `PATH` environment variable
<details><summary><b>Environment Variable Setup</b> (click to show)</summary>
<details>
<summary><b>Environment Variable Setup</b> (click to show)</summary>
Type `env` in the search bar and select "Edit the system environment variables".

@ -25,8 +25,8 @@ command-line tool for reading data from files.
This demo requires a much larger heap size than is normally used in JerryScript
deployments! In local testing, the following sizes were needed:
- 8192 (8M) for <https://sheetjs.com/pres.xlsx>
- 65536 (64M) for <https://sheetjs.com/pres.numbers>
- 8192 (8M) for https://sheetjs.com/pres.xlsx
- 65536 (64M) for https://sheetjs.com/pres.numbers
:::
@ -341,7 +341,8 @@ while the "CLI Test" demonstrates other concepts using the `jerry` CLI tool.
### Integration Example
<details><summary><b>Build Dependencies</b> (click to show)</summary>
<details>
<summary><b>Build Dependencies</b> (click to show)</summary>
The JerryScript build system requires `cmake`.

@ -236,7 +236,7 @@ input_dom_element.addEventListener("change", handleFileAsync, false);
</TabItem>
</Tabs>
<https://oss.sheetjs.com/sheetjs/> demonstrates the FileReader technique.
https://oss.sheetjs.com/sheetjs/ demonstrates the FileReader technique.
**For maximal compatibility (IE10+)**, the `FileReader` approach is recommended:
@ -436,7 +436,7 @@ req.send();
The [`xhr` demo](/docs/demos/network) includes a longer discussion and more examples.
<https://oss.sheetjs.com/sheetjs/ajax.html> shows fallback approaches for IE6+.
https://oss.sheetjs.com/sheetjs/ajax.html shows fallback approaches for IE6+.
</TabItem>
<TabItem value="nodejs" label="NodeJS">
@ -565,7 +565,8 @@ req.end();
The recommended approach is to buffer streams in memory and process once all of
the data has been collected. A proper streaming parse is technically impossible.
<details><summary><b>Technical details</b> (click to show)</summary>
<details>
<summary><b>Technical details</b> (click to show)</summary>
XLSX, XLSB, NUMBERS, and ODS files are ultimately ZIP files that contain binary
and XML entries. The ZIP file format stores the table of contents ("end of

@ -335,7 +335,8 @@ res.setHeader('Content-Type', 'application/vnd.ms-excel');
res.end(buf);
```
<details><summary><b>Complete Example</b> (click to show)</summary>
<details>
<summary><b>Complete Example</b> (click to show)</summary>
Install the library with
@ -392,7 +393,8 @@ evt.respondWith(new Response(buf, {
}));
```
<details><summary><b>Complete Example</b> (click to show)</summary>
<details>
<summary><b>Complete Example</b> (click to show)</summary>
Save the following script to `deno.ts` and run with `deno run -A deno.ts`. Open
a web browser and access `http://localhost:7262/` to download the workbook.
@ -445,7 +447,8 @@ return new Response(buf, {
});
```
<details><summary><b>Complete Example</b> (click to show)</summary>
<details>
<summary><b>Complete Example</b> (click to show)</summary>
<p>Download <a href={`https://cdn.sheetjs.com/xlsx-${current}/package/xlsx.mjs`}><code>xlsx.mjs</code></a>.
Save the following script to <code>bun.js</code> and run with <code>bun bun.js</code>. Open a web

@ -33,7 +33,8 @@ When processing small worksheets in older environments, sparse worksheets are
more efficient than dense worksheets. In newer browsers, when dealing with very
large worksheets, dense sheets use less memory and tend to be more efficient.
<details><summary><b>Migrating to Dense Mode</b> (click to show)</summary>
<details>
<summary><b>Migrating to Dense Mode</b> (click to show)</summary>
`read`, `readFile`, `write`, `writeFile`, and the various API functions support
sparse and dense worksheets. Functions that accept worksheet or workbook objects

@ -24,7 +24,8 @@ When reading a file, `wb.bookType` is the determined book type.
The various file formats use different internal names for file properties. The
workbook `Props` object normalizes the names:
<details open><summary><b>File Properties</b> (click to hide)</summary>
<details open>
<summary><b>File Properties</b> (click to hide)</summary>
| JS Name | Excel Description |
|:--------------|:-------------------------------|

@ -6,7 +6,8 @@ sidebar_position: 1
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
<details><summary><b>File Format Support</b> (click to show)</summary>
<details>
<summary><b>File Format Support</b> (click to show)</summary>
Dates are a core concept in nearly every spreadsheet application in existence.
Some legacy spreadsheet apps only supported dates. Others supported times as a
@ -191,7 +192,8 @@ the date code.
The following table covers some common formats:
<details><summary><b>Common Date-Time Formats</b> (click to show)</summary>
<details>
<summary><b>Common Date-Time Formats</b> (click to show)</summary>
| Fragment | Interpretation |
|:---------|:-----------------------------|
@ -253,7 +255,8 @@ if(!(wb?.Workbook?.WBProps?.date1904)) {
}
```
<details><summary><b>Why does the 1904 date system exist?</b> (click to show) </summary>
<details>
<summary><b>Why does the 1904 date system exist?</b> (click to show) </summary>
1900 was not a leap year. For the Gregorian calendar, the general rules are:
- every multiple of 400 is a leap year
@ -291,7 +294,8 @@ of universal time.
## How Files Store Dates and Times
<details><summary><b>Technical Details</b> (click to show)</summary>
<details>
<summary><b>Technical Details</b> (click to show)</summary>
XLS, XLSB, and most binary formats store the raw date codes. Special number
formats are used to indicate that the values are intended to be dates/times.
@ -551,7 +555,8 @@ XLSX.SSF.is_date("yyyy-mm-dd"); // true
XLSX.SSF.is_date("0.00"); // false
```
<details><summary><b>Live Demo</b> (click to show)</summary>
<details>
<summary><b>Live Demo</b> (click to show)</summary>
```jsx live
function SSFIsDate() {

@ -7,7 +7,8 @@ sidebar_position: 2
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
<details><summary><b>File Format Support</b> (click to show)</summary>
<details>
<summary><b>File Format Support</b> (click to show)</summary>
The parser will translate from the storage representation to A1-Style strings,
while the writer will translate from A1-Style strings to the file format.
@ -133,7 +134,8 @@ SheetJS formulae omit the `=`.
["A1-Style"](/docs/csf/general#a1-style) describes A1-Style in more detail.
<details open><summary><b>Live Example</b> (click to hide)</summary>
<details open>
<summary><b>Live Example</b> (click to hide)</summary>
For example, consider [this test file](pathname:///files/concat.xlsx):
@ -199,7 +201,8 @@ var worksheet = XLSX.utils.aoa_to_sheet([
]);
```
<details open><summary><b>Live Example</b> (click to hide)</summary>
<details open>
<summary><b>Live Example</b> (click to hide)</summary>
This demo creates a worksheet where `A1=1`, `A2=2`, and `A3=A1+A2`.
@ -287,7 +290,8 @@ Utilities and writers are expected to check for the presence of a `F` field and
ignore any possible formula element `f` in cells other than the starting cell.
They are not expected to perform validation of the formulae!
<details><summary><b>Live Example</b> (click to show)</summary>
<details>
<summary><b>Live Example</b> (click to show)</summary>
```jsx live
/* The live editor requires this function wrapper */
@ -352,7 +356,8 @@ XLSX.utils.sheet_set_array_formula(worksheet, "C1", "_xlfn.UNIQUE(A1:A3)", 1);
worksheet["C1"] = { t: "s", f: "_xlfn.UNIQUE(A1:A3)", F:"C1", D: 1 }; // dynamic
```
<details><summary><b>Live Example</b> (click to show)</summary>
<details>
<summary><b>Live Example</b> (click to show)</summary>
```jsx live
/* The live editor requires this function wrapper */
@ -405,7 +410,8 @@ formula `=CONTAR(A1:C3;B4:D6)` is equivalent to the SheetJS formula string
[JSON Translation table](https://oss.sheetjs.com/notes/fmla/table.json).
<details open><summary><b>Function Name Translator</b> (click to hide)</summary>
<details open>
<summary><b>Function Name Translator</b> (click to hide)</summary>
```jsx live
/* The live editor requires this function wrapper */

@ -4,7 +4,8 @@ sidebar_label: Hyperlinks
sidebar_position: 3
---
<details><summary><b>File Format Support</b> (click to show)</summary>
<details>
<summary><b>File Format Support</b> (click to show)</summary>
Traditional spreadsheet software, including Excel, support "Cell Links". The
entire cell text is clickable.
@ -43,7 +44,7 @@ objects include the following fields:
- `Tooltip` is the tooltip text. Tooltips are shown when hovering over the text.
For example, the following snippet creates a link from cell `A1` to
<https://sheetjs.com> with the tip `"Find us @ SheetJS.com!"`:
https://sheetjs.com with the tip `"Find us @ SheetJS.com!"`:
```js
/* create worksheet with cell A1 = "https://sheetjs.com" */
@ -91,7 +92,8 @@ ws["A2"].l = { Target: "https://docs.sheetjs.com/docs/csf/features/hyperlinks#we
ws["A3"].l = { Target: "http://localhost:7262/yes_localhost_works" };
```
<details open><summary><b>Live Example</b> (click to hide)</summary>
<details open>
<summary><b>Live Example</b> (click to hide)</summary>
```jsx live
/* The live editor requires this function wrapper */
@ -122,7 +124,8 @@ ws["A4"].l = { Target: "mailto:ignored@dev.null" };
ws["A5"].l = { Target: "mailto:ignored@dev.null?subject=Test Subject" };
```
<details><summary><b>Live Example</b> (click to show)</summary>
<details>
<summary><b>Live Example</b> (click to show)</summary>
**This demo creates a XLSX spreadsheet with a `mailto` email link. The email
address input in the form never leaves your machine.**
@ -190,7 +193,8 @@ ws["C2"].l = { Target: "#Sheet2!E2" }; /* Link to cell E2 in sheet Sheet2 */
ws["C3"].l = { Target: "#SheetJSDName" }; /* Link to Defined Name */
```
<details><summary><b>Live Example</b> (click to show)</summary>
<details>
<summary><b>Live Example</b> (click to show)</summary>
This demo creates a workbook with two worksheets. In the first worksheet:
@ -256,7 +260,8 @@ files will not open in Excel.
The HTML DOM parser[^1] will process `<a>` links in the table.
<details open><summary><b>Live Example</b> (click to hide)</summary>
<details open>
<summary><b>Live Example</b> (click to hide)</summary>
This example uses `table_to_book` to generate a SheetJS workbook object from a
HTML table. The hyperlink in the second row will be parsed as a cell-level link.
@ -290,7 +295,8 @@ function ExportHyperlink() {
The HTML writer[^2] will generate `<a>` links.
<details open><summary><b>Live Example</b> (click to hide)</summary>
<details open>
<summary><b>Live Example</b> (click to hide)</summary>
This example creates a worksheet where `A1` has a link and `B1` does not. The
`sheet_to_html` function generates an HTML table where the topleft table cell
@ -321,7 +327,8 @@ function ExportALinks() {
#### Miscellany
<details><summary><b>Extract all links from a file</b> (click to show)</summary>
<details>
<summary><b>Extract all links from a file</b> (click to show)</summary>
The following example iterates through each worksheet and each cell to find all
links. The table shows sheet name, cell address, and target for each link.

@ -4,7 +4,8 @@ sidebar_label: Cell Comments
sidebar_position: 4
---
<details><summary><b>File Format Support</b> (click to show)</summary>
<details>
<summary><b>File Format Support</b> (click to show)</summary>
Comments and Notes have evolved over the years.
@ -108,7 +109,8 @@ characters may cause issues with other formats.
#### Export
<details open><summary><b>Live Export Example</b> (click to hide)</summary>
<details open>
<summary><b>Live Export Example</b> (click to hide)</summary>
This example creates a small worksheet with a comment in cell A1:
@ -130,7 +132,8 @@ function SheetJSComments1() {
#### Import
<details><summary><b>Live Import Example</b> (click to show)</summary>
<details>
<summary><b>Live Import Example</b> (click to show)</summary>
This example displays every comment in the workbook:
@ -181,7 +184,8 @@ cell.c.hidden = true;
cell.c.push({a:"SheetJS", t:"This comment will be hidden"});
```
<details><summary><b>Live Example</b> (click to show)</summary>
<details>
<summary><b>Live Example</b> (click to show)</summary>
The following demo creates a worksheet with two comments. The comment in cell A1
will be visibile and the comment in cell A2 will be hidden.
@ -235,7 +239,8 @@ cell.c.push({ ...part2, T: true});
There is no Active Directory or Office 365 metadata associated with authors.
<details open><summary><b>Live Example</b> (click to hide)</summary>
<details open>
<summary><b>Live Example</b> (click to hide)</summary>
```jsx live
function SheetJSThreadedComments() {

@ -3,7 +3,8 @@ title: Defined Names
sidebar_position: 5
---
<details><summary><b>File Format Support</b> (click to show)</summary>
<details>
<summary><b>File Format Support</b> (click to show)</summary>
Defined names have evolved over the decades, with new features added over time:
@ -29,7 +30,8 @@ Defined names (sometimes called "named ranges") are labeled references to cells,
ranges, constants or formulae. Meaningful labels can make formula expressions
more readable and more robust to worksheet changes.
<details><summary><b>Why are Defined Names useful?</b> (click to show)</summary>
<details>
<summary><b>Why are Defined Names useful?</b> (click to show)</summary>
For example, the `NPV` formula function calculates the net present value of a
series of cashflows. In large workbooks, raw data will be stored in separate

@ -3,7 +3,8 @@ title: Number Formats
sidebar_position: 6
---
<details><summary><b>File Format Support</b> (click to show)</summary>
<details>
<summary><b>File Format Support</b> (click to show)</summary>
Modern applications separate "content" from "presentation". A value like `$3.50`
is typically stored as the underlying value (`3.50`) with a format (`$0.00`).

Some files were not shown because too many files have changed in this diff Show More