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

View File

@ -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

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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.

View File

@ -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.

View File

@ -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.**
:::

View File

@ -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>

View File

@ -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) => {

View File

@ -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)

View File

@ -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,

View File

@ -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 "";

View File

@ -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() {

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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">

View File

@ -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

View File

@ -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`:

View File

@ -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.

View File

@ -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**

View File

@ -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>

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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.

View File

@ -50,7 +50,8 @@ sequenceDiagram
end
```