forked from sheetjs/docs.sheetjs.com
		
	Added Test Data to docs site
This commit is contained in:
		
							parent
							
								
									671729b289
								
							
						
					
					
						commit
						b503ebc14d
					
				| @ -123,6 +123,7 @@ This demo was last tested in the following deployments: | ||||
| |:-------------|:--------|:-----------| | ||||
| | `darwin-x64` | `1.1.4` | 2024-04-19 | | ||||
| | `win10-x64`  | `1.1.4` | 2024-04-19 | | ||||
| | `linux-x64`  | `1.1.4` | 2024-04-25 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -158,7 +159,7 @@ import * as fs from 'fs'; | ||||
| XLSX.set_fs(fs); | ||||
| 
 | ||||
| /* fetch JSON data and parse */ | ||||
| const url = "https://sheetjs.com/data/executive.json"; | ||||
| const url = "https://docs.sheetjs.com/executive.json"; | ||||
| const raw_data = await (await fetch(url)).json(); | ||||
| 
 | ||||
| /* filter for the Presidents */ | ||||
|  | ||||
| @ -43,14 +43,14 @@ sequenceDiagram | ||||
| ## Acquire Data | ||||
| 
 | ||||
| The raw data is available in JSON form[^1]. It has been mirrored at | ||||
| https://sheetjs.com/data/executive.json | ||||
| https://docs.sheetjs.com/executive.json | ||||
| 
 | ||||
| ### Raw Data | ||||
| 
 | ||||
| Acquiring the data is straightforward with `fetch`: | ||||
| 
 | ||||
| ```js | ||||
| const url = "https://sheetjs.com/data/executive.json"; | ||||
| const url = "https://docs.sheetjs.com/executive.json"; | ||||
| const raw_data = await (await fetch(url)).json(); | ||||
| ``` | ||||
| 
 | ||||
| @ -555,7 +555,7 @@ browser should try to create `Presidents.xlsx` | ||||
| ```jsx live | ||||
| function Presidents() { return ( <button onClick={async () => { | ||||
|   /* fetch JSON data and parse */ | ||||
|   const url = "https://sheetjs.com/data/executive.json"; | ||||
|   const url = "https://docs.sheetjs.com/executive.json"; | ||||
|   const raw_data = await (await fetch(url)).json(); | ||||
| 
 | ||||
|   /* filter for the Presidents */ | ||||
| @ -603,7 +603,7 @@ Save the following script to `SheetJSStandaloneDemo.html`: | ||||
| <script> | ||||
| (async() => { | ||||
|   /* fetch JSON data and parse */ | ||||
|   const url = "https://sheetjs.com/data/executive.json"; | ||||
|   const url = "https://docs.sheetjs.com/executive.json"; | ||||
|   const raw_data = await (await fetch(url)).json(); | ||||
| \n\ | ||||
|   /* filter for the Presidents */ | ||||
| @ -677,7 +677,7 @@ const XLSX = require("xlsx"); | ||||
| 
 | ||||
| (async() => { | ||||
|   /* fetch JSON data and parse */ | ||||
|   const url = "https://sheetjs.com/data/executive.json"; | ||||
|   const url = "https://docs.sheetjs.com/executive.json"; | ||||
|   const raw_data = await (await fetch(url)).json(); | ||||
| 
 | ||||
|   /* filter for the Presidents */ | ||||
| @ -755,7 +755,7 @@ const axios = require("axios"); | ||||
| 
 | ||||
| (async() => { | ||||
|   /* fetch JSON data and parse */ | ||||
|   const url = "https://sheetjs.com/data/executive.json"; | ||||
|   const url = "https://docs.sheetjs.com/executive.json"; | ||||
|   // highlight-next-line | ||||
|   const raw_data = (await axios(url, {responseType: "json"})).data; | ||||
| 
 | ||||
| @ -814,7 +814,7 @@ Save the following script to `SheetJSDeno.ts`: | ||||
| import * as XLSX from 'https://cdn.sheetjs.com/xlsx-${current}/package/xlsx.mjs'; | ||||
| \n\ | ||||
| /* fetch JSON data and parse */ | ||||
| const url = "https://sheetjs.com/data/executive.json"; | ||||
| const url = "https://docs.sheetjs.com/executive.json"; | ||||
| const raw_data = await (await fetch(url)).json(); | ||||
| \n\ | ||||
| /* filter for the Presidents */ | ||||
| @ -871,7 +871,7 @@ Save the following script to `SheetJSNW.html`: | ||||
| <script> | ||||
| (async() => { | ||||
|   /* fetch JSON data and parse */ | ||||
|   const url = "https://sheetjs.com/data/executive.json"; | ||||
|   const url = "https://docs.sheetjs.com/executive.json"; | ||||
|   const raw_data = await (await fetch(url)).json(); | ||||
| \n\ | ||||
|   /* filter for the Presidents */ | ||||
| @ -978,7 +978,7 @@ import RNBU from 'react-native-blob-util'; | ||||
| 
 | ||||
| const make_workbook = async() => { | ||||
|   /* fetch JSON data and parse */ | ||||
|   const url = "https://sheetjs.com/data/executive.json"; | ||||
|   const url = "https://docs.sheetjs.com/executive.json"; | ||||
|   const raw_data = await (await fetch(url)).json(); | ||||
| 
 | ||||
|   /* filter for the Presidents */ | ||||
|  | ||||
| @ -41,7 +41,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://docs.sheetjs.com/PortfolioSummary.xls | ||||
| 
 | ||||
| :::info pass | ||||
| 
 | ||||
| @ -55,7 +55,7 @@ data is not lost in the sands of time. | ||||
| Downloading the file is straightforward with `fetch`: | ||||
| 
 | ||||
| ```js | ||||
| const url = "https://sheetjs.com/data/PortfolioSummary.xls"; | ||||
| const url = "https://docs.sheetjs.com/PortfolioSummary.xls"; | ||||
| const file = await (await fetch(url)).arrayBuffer(); | ||||
| ``` | ||||
| 
 | ||||
| @ -180,7 +180,7 @@ function SheetJSheetNames() { | ||||
|   const [names, setNames] = React.useState([]); | ||||
|   React.useEffect(() => { (async() =>{ | ||||
|     /* parse workbook */ | ||||
|     const url = "https://sheetjs.com/data/PortfolioSummary.xls"; | ||||
|     const url = "https://docs.sheetjs.com/PortfolioSummary.xls"; | ||||
|     const file = await (await fetch(url)).arrayBuffer(); | ||||
|     const workbook = XLSX.read(file); | ||||
|     /* display sheet names */ | ||||
| @ -228,7 +228,7 @@ function SheetJSHTMLView() { | ||||
|   const [__html, setHTML] = React.useState(""); | ||||
|   React.useEffect(() => { (async() =>{ | ||||
|     /* parse workbook, limiting to 20 rows */ | ||||
|     const url = "https://sheetjs.com/data/PortfolioSummary.xls"; | ||||
|     const url = "https://docs.sheetjs.com/PortfolioSummary.xls"; | ||||
|     const workbook = XLSX.read(await (await fetch(url)).arrayBuffer(), {sheetRows:20}); | ||||
|     /* get first worksheet */ | ||||
|     const worksheet = workbook.Sheets[workbook.SheetNames[0]]; | ||||
| @ -247,7 +247,7 @@ The key points from looking at the table are: | ||||
| - The data starts on row 7 | ||||
| - Rows 5 and 6 are the header rows, with merged cells for common titles | ||||
| - For yearly data (2007-2012), columns A and B are merged | ||||
| - For quarterly data (2013Q1 - 2023Q2), column A stores the year. Cells may be | ||||
| - For quarterly data (2013Q1 and later), column A stores the year. Cells may be | ||||
|   merged vertically to span 4 quarters | ||||
| 
 | ||||
| ## Extract Data | ||||
| @ -315,7 +315,7 @@ function SheetJSAoAHoles() { | ||||
|   const [rows, setRows] = React.useState([]); | ||||
|   React.useEffect(() => { (async() =>{ | ||||
|     /* parse workbook */ | ||||
|     const url = "https://sheetjs.com/data/PortfolioSummary.xls"; | ||||
|     const url = "https://docs.sheetjs.com/PortfolioSummary.xls"; | ||||
|     const workbook = XLSX.read(await (await fetch(url)).arrayBuffer()); | ||||
|     /* get first worksheet */ | ||||
|     const worksheet = workbook.Sheets[workbook.SheetNames[0]]; | ||||
| @ -466,7 +466,7 @@ function SheetJSAoAFilled() { | ||||
|   const [rows, setRows] = React.useState([]); | ||||
|   React.useEffect(() => { (async() =>{ | ||||
|     /* parse workbook */ | ||||
|     const url = "https://sheetjs.com/data/PortfolioSummary.xls"; | ||||
|     const url = "https://docs.sheetjs.com/PortfolioSummary.xls"; | ||||
|     const workbook = XLSX.read(await (await fetch(url)).arrayBuffer()); | ||||
|     /* get first worksheet */ | ||||
|     const worksheet = workbook.Sheets[workbook.SheetNames[0]]; | ||||
| @ -488,11 +488,20 @@ function SheetJSAoAFilled() { | ||||
| 
 | ||||
| ### Select Data Rows | ||||
| 
 | ||||
| At this point, every data row will have the year in column `A`. Since this year | ||||
| is between 2007 and 2023, `Array#filter` can be used to select the rows: | ||||
| At this point, each data row will have the year in column `A` and dollar value | ||||
| in column `C`. The year will be between 2007 and 2024 and the value will be | ||||
| positive. The following function tests a data row: | ||||
| 
 | ||||
| ```js | ||||
| const rows = raw_data.filter(r => r[0] >= 2007 && r[0] <= 2023); | ||||
| const is_valid_row = r => | ||||
|   r[0] >= 2007 && r[0] <= 2024 // year (column A) is between 2007 and 2024 | ||||
|   && r[2] > 0; // dollar value (column C) is positive | ||||
| ``` | ||||
| 
 | ||||
| `Array#filter`, using the previous test, can select the matching rows: | ||||
| 
 | ||||
| ```js | ||||
| const rows = raw_data.filter(r => r[0] >= 2007 && r[0] <= 2024 && r[2] > 0); | ||||
| ``` | ||||
| 
 | ||||
| <details> | ||||
| @ -503,7 +512,7 @@ function SheetJSAoAFiltered() { | ||||
|   const [rows, setRows] = React.useState([]); | ||||
|   React.useEffect(() => { (async() =>{ | ||||
|     /* parse workbook */ | ||||
|     const url = "https://sheetjs.com/data/PortfolioSummary.xls"; | ||||
|     const url = "https://docs.sheetjs.com/PortfolioSummary.xls"; | ||||
|     const workbook = XLSX.read(await (await fetch(url)).arrayBuffer()); | ||||
|     /* get first worksheet */ | ||||
|     const worksheet = workbook.Sheets[workbook.SheetNames[0]]; | ||||
| @ -512,7 +521,7 @@ function SheetJSAoAFiltered() { | ||||
|     var last_year = 0; | ||||
|     raw_data.forEach(r => last_year = r[0] = (r[0] != null ? r[0] : last_year)); | ||||
|     /* select data rows */ | ||||
|     const rows = raw_data.filter(r => r[0] >= 2007 && r[0] <= 2023); | ||||
|     const rows = raw_data.filter(r => r[0] >= 2007 && r[0] <= 2024 && r[2] > 0); | ||||
|     /* display data */ | ||||
|     setRows(rows); | ||||
|   })(); }, []); | ||||
| @ -579,7 +588,7 @@ function SheetJSObjects() { | ||||
|   const [rows, setRows] = React.useState([]); | ||||
|   React.useEffect(() => { (async() =>{ | ||||
|     /* parse workbook */ | ||||
|     const url = "https://sheetjs.com/data/PortfolioSummary.xls"; | ||||
|     const url = "https://docs.sheetjs.com/PortfolioSummary.xls"; | ||||
|     const workbook = XLSX.read(await (await fetch(url)).arrayBuffer()); | ||||
|     /* get first worksheet */ | ||||
|     const worksheet = workbook.Sheets[workbook.SheetNames[0]]; | ||||
| @ -588,7 +597,7 @@ function SheetJSObjects() { | ||||
|     var last_year = 0; | ||||
|     raw_data.forEach(r => last_year = r[0] = (r[0] != null ? r[0] : last_year)); | ||||
|     /* select data rows */ | ||||
|     const rows = raw_data.filter(r => r[0] >= 2007 && r[0] <= 2023); | ||||
|     const rows = raw_data.filter(r => r[0] >= 2007 && r[0] <= 2024 && r[2] > 0); | ||||
|     /* generate row objects */ | ||||
|     const objects = rows.map(r => ({FY: r[0], FQ: r[1], total: r[8]})); | ||||
|     /* display data */ | ||||
| @ -684,7 +693,7 @@ function StudentAidTotal() { | ||||
|   const [num, setNum] = React.useState(5); | ||||
|   React.useEffect(() => { (async() =>{ | ||||
|     /* parse workbook */ | ||||
|     const url = "https://sheetjs.com/data/PortfolioSummary.xls"; | ||||
|     const url = "https://docs.sheetjs.com/PortfolioSummary.xls"; | ||||
|     const workbook = XLSX.read(await (await fetch(url)).arrayBuffer()); | ||||
| 
 | ||||
|     /* get first worksheet */ | ||||
| @ -696,7 +705,7 @@ function StudentAidTotal() { | ||||
|     raw_data.forEach(r => last_year = r[0] = (r[0] != null ? r[0] : last_year)); | ||||
| 
 | ||||
|     /* select data rows */ | ||||
|     const rows = raw_data.filter(r => r[0] >= 2007 && r[0] <= 2023); | ||||
|     const rows = raw_data.filter(r => r[0] >= 2007 && r[0] <= 2024 && r[2] > 0); | ||||
| 
 | ||||
|     /* generate row objects */ | ||||
|     const objects = rows.map(r => ({FY: r[0], FQ: r[1], total: r[8]})); | ||||
| @ -739,7 +748,7 @@ Save the following script to `SheetJSStandaloneDemo.html`: | ||||
| <script> | ||||
| (async() => { | ||||
|   /* parse workbook */ | ||||
|   const url = "https://sheetjs.com/data/PortfolioSummary.xls"; | ||||
|   const url = "https://docs.sheetjs.com/PortfolioSummary.xls"; | ||||
|   const workbook = XLSX.read(await (await fetch(url)).arrayBuffer()); | ||||
| \n\ | ||||
|   /* get first worksheet */ | ||||
| @ -751,7 +760,7 @@ Save the following script to `SheetJSStandaloneDemo.html`: | ||||
|   raw_data.forEach(r => last_year = r[0] = (r[0] != null ? r[0] : last_year)); | ||||
| \n\ | ||||
|   /* select data rows */ | ||||
|   const rows = raw_data.filter(r => r[0] >= 2007 && r[0] <= 2023); | ||||
|   const rows = raw_data.filter(r => r[0] >= 2007 && r[0] <= 2024 && r[2] > 0); | ||||
| \n\ | ||||
|   /* generate row objects */ | ||||
|   const objects = rows.map(r => ({FY: r[0], FQ: r[1], total: r[8]})); | ||||
| @ -805,7 +814,7 @@ Save the following script to `SheetJSNodeJS.js`: | ||||
| const XLSX = require("xlsx"); | ||||
| (async() => { | ||||
|   /* parse workbook */ | ||||
|   const url = "https://sheetjs.com/data/PortfolioSummary.xls"; | ||||
|   const url = "https://docs.sheetjs.com/PortfolioSummary.xls"; | ||||
|   const workbook = XLSX.read(await (await fetch(url)).arrayBuffer()); | ||||
| 
 | ||||
|   /* get first worksheet */ | ||||
| @ -817,7 +826,7 @@ const XLSX = require("xlsx"); | ||||
|   raw_data.forEach(r => last_year = r[0] = (r[0] != null ? r[0] : last_year)); | ||||
| 
 | ||||
|   /* select data rows */ | ||||
|   const rows = raw_data.filter(r => r[0] >= 2007 && r[0] <= 2023); | ||||
|   const rows = raw_data.filter(r => r[0] >= 2007 && r[0] <= 2024 && r[2] > 0); | ||||
| 
 | ||||
|   /* generate row objects */ | ||||
|   const objects = rows.map(r => ({FY: r[0], FQ: r[1], total: r[8]})); | ||||
| @ -878,7 +887,7 @@ Save the following script to `SheetJSNW.html`: | ||||
| <script> | ||||
| (async() => { | ||||
|   /* parse workbook */ | ||||
|   const url = "https://sheetjs.com/data/PortfolioSummary.xls"; | ||||
|   const url = "https://docs.sheetjs.com/PortfolioSummary.xls"; | ||||
|   const workbook = XLSX.read(await (await fetch(url)).arrayBuffer()); | ||||
| \n\ | ||||
|   /* get first worksheet */ | ||||
| @ -890,7 +899,7 @@ Save the following script to `SheetJSNW.html`: | ||||
|   raw_data.forEach(r => last_year = r[0] = (r[0] != null ? r[0] : last_year)); | ||||
| \n\ | ||||
|   /* select data rows */ | ||||
|   const rows = raw_data.filter(r => r[0] >= 2007 && r[0] <= 2023); | ||||
|   const rows = raw_data.filter(r => r[0] >= 2007 && r[0] <= 2024 && r[2] > 0); | ||||
| \n\ | ||||
|   /* generate row objects */ | ||||
|   const objects = rows.map(r => ({FY: r[0], FQ: r[1], total: r[8]})); | ||||
| @ -979,7 +988,7 @@ const App = () => { | ||||
|   const [rows, setRows] = React.useState([]); | ||||
|   React.useEffect(() => { (async() =>{ | ||||
|     /* parse workbook */ | ||||
|     const url = "https://sheetjs.com/data/PortfolioSummary.xls"; | ||||
|     const url = "https://docs.sheetjs.com/PortfolioSummary.xls"; | ||||
|     const workbook = read(await (await fetch(url)).arrayBuffer()); | ||||
| 
 | ||||
|     /* get first worksheet */ | ||||
| @ -991,7 +1000,7 @@ const App = () => { | ||||
|     raw_data.forEach(r => last_year = r[0] = (r[0] != null ? r[0] : last_year)); | ||||
| 
 | ||||
|     /* select data rows */ | ||||
|     const rows = raw_data.filter(r => r[0] >= 2007 && r[0] <= 2023); | ||||
|     const rows = raw_data.filter(r => r[0] >= 2007 && r[0] <= 2024 && r[2] > 0); | ||||
| 
 | ||||
|     /* generate row objects */ | ||||
|     const objects = rows.map(r => ({FY: r[0], FQ: r[1], total: r[8]})); | ||||
|  | ||||
| @ -19,7 +19,7 @@ This demo covers details elided in the official DanfoJS documentation. | ||||
| 
 | ||||
| :::note Tested Deployments | ||||
| 
 | ||||
| This example was last tested on 2024 January 03 against DanfoJS 1.1.2. | ||||
| This example was last tested on 2024 April 25 against DanfoJS 1.1.2. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -114,7 +114,7 @@ const first_three_rows = await dfd.readExcel(url, { parsingOptions: { | ||||
| 
 | ||||
| #### URL source | ||||
| 
 | ||||
| The following example fetches a [test file](https://sheetjs.com/pres.xlsx), | ||||
| The following example fetches a [test file](https://docs.sheetjs.com/pres.xlsx), | ||||
| parses with SheetJS and generates a DanfoJS dataframe. | ||||
| 
 | ||||
| ```jsx live | ||||
| @ -122,7 +122,7 @@ function DanfoReadExcelURL() { | ||||
|   const [text, setText] = React.useState(""); | ||||
|   React.useEffect(() => { (async() => { | ||||
|     if(typeof dfd === "undefined") return setText("RELOAD THIS PAGE!"); | ||||
|     const df = await dfd.readExcel("https://sheetjs.com/pres.xlsx"); | ||||
|     const df = await dfd.readExcel("https://docs.sheetjs.com/pres.xlsx"); | ||||
|     setText("" + df.head()); | ||||
|   })(); }, []); | ||||
|   return (<pre>{text}</pre>); | ||||
|  | ||||
| @ -90,7 +90,7 @@ function worksheet_to_csv_url(worksheet) { | ||||
| ### CSV Demo | ||||
| 
 | ||||
| This demo shows a simple model fitting using the "cars" dataset from TensorFlow. | ||||
| The [sample XLS file](https://sheetjs.com/data/cd.xls) contains the data. The | ||||
| The [sample XLS file](https://docs.sheetjs.com/cd.xls) contains the data. The | ||||
| data processing mirrors the official "Making Predictions from 2D Data" demo[^3]. | ||||
| 
 | ||||
| ```mermaid | ||||
| @ -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://docs.sheetjs.com/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 | ||||
| @ -172,7 +172,7 @@ function SheetJSToTFJSCSV() { | ||||
|     setResults([]); setOutput(""); setDisabled(true); | ||||
|     try { | ||||
|     /* fetch file */ | ||||
|     const f = await fetch("https://sheetjs.com/data/cd.xls"); | ||||
|     const f = await fetch("https://docs.sheetjs.com/cd.xls"); | ||||
|     const ab = await f.arrayBuffer(); | ||||
|     /* parse file and get first worksheet */ | ||||
|     const wb = XLSX.read(ab); | ||||
| @ -256,7 +256,7 @@ loads data from a JSON file: | ||||
| ] | ||||
| ``` | ||||
| 
 | ||||
| In real use cases, data is stored in [spreadsheets](https://sheetjs.com/data/cd.xls) | ||||
| In real use cases, data is stored in [spreadsheets](https://docs.sheetjs.com/cd.xls) | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| @ -273,7 +273,7 @@ Differences from the official example are highlighted below: | ||||
| async function getData() { | ||||
|   // highlight-start | ||||
|   /* fetch file */ | ||||
|   const carsDataResponse = await fetch('https://sheetjs.com/data/cd.xls'); | ||||
|   const carsDataResponse = await fetch('https://docs.sheetjs.com/cd.xls'); | ||||
|   /* get file data (ArrayBuffer) */ | ||||
|   const carsDataAB = await carsDataResponse.arrayBuffer(); | ||||
|   /* parse */ | ||||
| @ -429,7 +429,7 @@ var worksheet = XLSX.utils.aoa_to_sheet(aoa); | ||||
| 
 | ||||
| [^1]: See [`tf.data.csv`](https://js.tensorflow.org/api/latest/#data.csv) in the TensorFlow.js documentation | ||||
| [^2]: See [`sheet_to_csv` in "CSV and Text"](/docs/api/utilities/csv#delimiter-separated-output) | ||||
| [^3]: The ["Making Predictions from 2D Data" example](https://codelabs.developers.google.com/codelabs/tfjs-training-regression/) uses a hosted JSON file. The [sample XLS file](https://sheetjs.com/data/cd.xls) includes the same data. | ||||
| [^3]: The ["Making Predictions from 2D Data" example](https://codelabs.developers.google.com/codelabs/tfjs-training-regression/) uses a hosted JSON file. The [sample XLS file](https://docs.sheetjs.com/cd.xls) includes the same data. | ||||
| [^4]: See [`read` in "Reading Files"](/docs/api/parse-options) | ||||
| [^5]: See ["Workbook Object"](/docs/csf/book) | ||||
| [^6]: See [`sheet_to_csv` in "CSV and Text"](/docs/api/utilities/csv#delimiter-separated-output) | ||||
|  | ||||
| @ -378,12 +378,12 @@ curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`} | ||||
| 
 | ||||
| 4) Download the following test scripts and files: | ||||
| 
 | ||||
| - [`pres.numbers` test file](https://sheetjs.com/pres.numbers) | ||||
| - [`pres.numbers` test file](https://docs.sheetjs.com/pres.numbers) | ||||
| - [`sheetjs.py` script](pathname:///pandas/sheetjs.py) | ||||
| - [`SheetJSPandas.py` script](pathname:///pandas/SheetJSPandas.py) | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pandas/sheetjs.py | ||||
| curl -LO https://docs.sheetjs.com/pandas/SheetJSPandas.py | ||||
| ``` | ||||
|  | ||||
| @ -61,9 +61,9 @@ loaded into the site.  This sheet will have known columns. | ||||
| 
 | ||||
| #### State | ||||
| 
 | ||||
| The example [presidents sheet](https://sheetjs.com/pres.xlsx) has one header row | ||||
| with "Name" and "Index" columns. The natural JS representation is an object for | ||||
| each row, using the values in the first rows as keys: | ||||
| The example [presidents sheet](https://docs.sheetjs.com/pres.xlsx) has one | ||||
| header row with "Name" and "Index" columns. The natural JS representation is an | ||||
| object for each row, using the values in the first rows as keys: | ||||
| 
 | ||||
| <table> | ||||
|   <thead><tr><th>Spreadsheet</th><th>State</th></tr></thead> | ||||
| @ -165,8 +165,8 @@ import { read, utils } from 'xlsx'; | ||||
| 
 | ||||
| /* Fetch and update the state once */ | ||||
| useEffect(() => { (async() => { | ||||
|   /* Download from https://sheetjs.com/pres.numbers */ | ||||
|   const f = await fetch("https://sheetjs.com/pres.numbers"); | ||||
|   /* Download from https://docs.sheetjs.com/pres.numbers */ | ||||
|   const f = await fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
|   const ab = await f.arrayBuffer(); | ||||
| 
 | ||||
|   // highlight-start | ||||
| @ -192,8 +192,8 @@ import { read, utils } from 'xlsx'; | ||||
| 
 | ||||
| /* Fetch and update the state once */ | ||||
| useEffect(() => { (async() => { | ||||
|   /* Download from https://sheetjs.com/pres.numbers */ | ||||
|   const f = await fetch("https://sheetjs.com/pres.numbers"); | ||||
|   /* Download from https://docs.sheetjs.com/pres.numbers */ | ||||
|   const f = await fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
|   const ab = await f.arrayBuffer(); | ||||
| 
 | ||||
|   // highlight-start | ||||
| @ -295,7 +295,7 @@ export default function SheetJSKaiokenAoO() { | ||||
| 
 | ||||
|   /* Fetch and update the state once */ | ||||
|   useEffect(() => { (async() => { | ||||
|     const f = await (await fetch("https://sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
|     const f = await (await fetch("https://docs.sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
|     const wb = read(f); // parse the array buffer | ||||
|     const ws = wb.Sheets[wb.SheetNames[0]]; // get the first worksheet | ||||
|     const data = utils.sheet_to_json<President>(ws); // generate objects | ||||
| @ -412,7 +412,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://docs.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. | ||||
| 
 | ||||
| @ -443,7 +443,7 @@ export default function SheetJSKaiokenHTML() { | ||||
| 
 | ||||
|   /* Fetch and update the state once */ | ||||
|   useEffect(() => { (async() => { | ||||
|     const f = await (await fetch("https://sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
|     const f = await (await fetch("https://docs.sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
|     const wb = read(f); // parse the array buffer | ||||
|     const ws = wb.Sheets[wb.SheetNames[0]]; // get the first worksheet | ||||
|     // highlight-start | ||||
| @ -559,7 +559,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://docs.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. | ||||
| 
 | ||||
|  | ||||
| @ -57,9 +57,9 @@ loaded into the site.  This sheet will have known columns. | ||||
| 
 | ||||
| #### State | ||||
| 
 | ||||
| The example [presidents sheet](https://sheetjs.com/pres.xlsx) has one header row | ||||
| with "Name" and "Index" columns. The natural JS representation is an object for | ||||
| each row, using the values in the first rows as keys: | ||||
| The example [presidents sheet](https://docs.sheetjs.com/pres.xlsx) has one | ||||
| header row with "Name" and "Index" columns. The natural JS representation is an | ||||
| object for each row, using the values in the first rows as keys: | ||||
| 
 | ||||
| <table> | ||||
|   <thead><tr><th>Spreadsheet</th><th>State</th></tr></thead> | ||||
| @ -161,8 +161,8 @@ import { read, utils } from 'xlsx'; | ||||
| 
 | ||||
| /* Fetch and update the state once */ | ||||
| useEffect(() => { (async() => { | ||||
|   /* Download from https://sheetjs.com/pres.numbers */ | ||||
|   const f = await fetch("https://sheetjs.com/pres.numbers"); | ||||
|   /* Download from https://docs.sheetjs.com/pres.numbers */ | ||||
|   const f = await fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
|   const ab = await f.arrayBuffer(); | ||||
| 
 | ||||
|   // highlight-start | ||||
| @ -188,8 +188,8 @@ import { read, utils } from 'xlsx'; | ||||
| 
 | ||||
| /* Fetch and update the state once */ | ||||
| useEffect(() => { (async() => { | ||||
|   /* Download from https://sheetjs.com/pres.numbers */ | ||||
|   const f = await fetch("https://sheetjs.com/pres.numbers"); | ||||
|   /* Download from https://docs.sheetjs.com/pres.numbers */ | ||||
|   const f = await fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
|   const ab = await f.arrayBuffer(); | ||||
| 
 | ||||
|   // highlight-start | ||||
| @ -286,7 +286,7 @@ export default function SheetJSReactAoO() { | ||||
| 
 | ||||
|   /* Fetch and update the state once */ | ||||
|   useEffect(() => { (async() => { | ||||
|     const f = await (await fetch("https://sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
|     const f = await (await fetch("https://docs.sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
|     // highlight-start | ||||
|     const wb = read(f); // parse the array buffer | ||||
|     const ws = wb.Sheets[wb.SheetNames[0]]; // get the first worksheet | ||||
| @ -544,7 +544,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://docs.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. | ||||
| 
 | ||||
| @ -577,7 +577,7 @@ export default function SheetJSReactHTML() { | ||||
| 
 | ||||
|   /* Fetch and update the state once */ | ||||
|   useEffect(() => { (async() => { | ||||
|     const f = await (await fetch("https://sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
|     const f = await (await fetch("https://docs.sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
|     const wb = read(f); // parse the array buffer | ||||
|     const ws = wb.Sheets[wb.SheetNames[0]]; // get the first worksheet | ||||
|     // highlight-start | ||||
| @ -713,7 +713,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://docs.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. | ||||
| 
 | ||||
|  | ||||
| @ -87,9 +87,9 @@ loaded into the site.  This sheet will have known columns. | ||||
| 
 | ||||
| #### State | ||||
| 
 | ||||
| The example [presidents sheet](https://sheetjs.com/pres.xlsx) has one header row | ||||
| with "Name" and "Index" columns. The natural JS representation is an object for | ||||
| each row, using the values in the first rows as keys: | ||||
| The example [presidents sheet](https://docs.sheetjs.com/pres.xlsx) has one | ||||
| header row with "Name" and "Index" columns. The natural JS representation is an | ||||
| object for each row, using the values in the first rows as keys: | ||||
| 
 | ||||
| <table> | ||||
|   <thead><tr><th>Spreadsheet</th><th>State</th></tr></thead> | ||||
| @ -184,8 +184,8 @@ interface President { Name: string; Index: number }; | ||||
| export class AppComponent { | ||||
|   rows: President[] = [ { Name: "SheetJS", Index: 0 }]; | ||||
|   ngOnInit(): void { (async() => { | ||||
|     /* Download from https://sheetjs.com/pres.numbers */ | ||||
|     const f = await fetch("https://sheetjs.com/pres.numbers"); | ||||
|     /* Download from https://docs.sheetjs.com/pres.numbers */ | ||||
|     const f = await fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
|     const ab = await f.arrayBuffer(); | ||||
| 
 | ||||
|     // highlight-start | ||||
| @ -331,8 +331,8 @@ export class AppComponent { | ||||
|   // highlight-next-line | ||||
|   rows: President[] = [ { Name: "SheetJS", Index: 0 }]; | ||||
|   ngOnInit(): void { (async() => { | ||||
|     /* Download from https://sheetjs.com/pres.numbers */ | ||||
|     const f = await fetch("https://sheetjs.com/pres.numbers"); | ||||
|     /* Download from https://docs.sheetjs.com/pres.numbers */ | ||||
|     const f = await fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
|     const ab = await f.arrayBuffer(); | ||||
| 
 | ||||
|     /* parse workbook */ | ||||
| @ -389,8 +389,8 @@ export class AppComponent { | ||||
|   // highlight-next-line | ||||
|   rows: President[] = [ { Name: "SheetJS", Index: 0 }]; | ||||
|   ngOnInit(): void { (async() => { | ||||
|     /* Download from https://sheetjs.com/pres.numbers */ | ||||
|     const f = await fetch("https://sheetjs.com/pres.numbers"); | ||||
|     /* Download from https://docs.sheetjs.com/pres.numbers */ | ||||
|     const f = await fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
|     const ab = await f.arrayBuffer(); | ||||
| 
 | ||||
|     /* parse workbook */ | ||||
| @ -536,8 +536,8 @@ export class AppComponent { | ||||
|   @ViewChild('tableau') tabeller!: ElementRef<HTMLDivElement>; | ||||
|   // highlight-end | ||||
|   ngOnInit(): void { (async() => { | ||||
|     /* Download from https://sheetjs.com/pres.numbers */ | ||||
|     const f = await fetch("https://sheetjs.com/pres.numbers"); | ||||
|     /* Download from https://docs.sheetjs.com/pres.numbers */ | ||||
|     const f = await fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
|     const ab = await f.arrayBuffer(); | ||||
| 
 | ||||
|     /* parse workbook */ | ||||
| @ -583,8 +583,8 @@ export class AppComponent { | ||||
|   @ViewChild('tableau') tabeller!: ElementRef<HTMLDivElement>; | ||||
|   // highlight-end | ||||
|   ngOnInit(): void { (async() => { | ||||
|     /* Download from https://sheetjs.com/pres.numbers */ | ||||
|     const f = await fetch("https://sheetjs.com/pres.numbers"); | ||||
|     /* Download from https://docs.sheetjs.com/pres.numbers */ | ||||
|     const f = await fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
|     const ab = await f.arrayBuffer(); | ||||
| 
 | ||||
|     /* parse workbook */ | ||||
|  | ||||
| @ -56,9 +56,9 @@ loaded into the site.  This sheet will have known columns. | ||||
| 
 | ||||
| #### State | ||||
| 
 | ||||
| The example [presidents sheet](https://sheetjs.com/pres.xlsx) has one header row | ||||
| with "Name" and "Index" columns. The natural JS representation is an object for | ||||
| each row, using the values in the first rows as keys: | ||||
| The example [presidents sheet](https://docs.sheetjs.com/pres.xlsx) has one | ||||
| header row with "Name" and "Index" columns. The natural JS representation is an | ||||
| object for each row, using the values in the first rows as keys: | ||||
| 
 | ||||
| <table> | ||||
|   <thead><tr><th>Spreadsheet</th><th>State</th></tr></thead> | ||||
| @ -170,8 +170,8 @@ const pres = ref([]); | ||||
| 
 | ||||
| /* Fetch and update the state once */ | ||||
| onMounted(async() => { | ||||
|   /* Download from https://sheetjs.com/pres.numbers */ | ||||
|   const f = await fetch("https://sheetjs.com/pres.numbers"); | ||||
|   /* Download from https://docs.sheetjs.com/pres.numbers */ | ||||
|   const f = await fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
|   const ab = await f.arrayBuffer(); | ||||
| 
 | ||||
|   // highlight-start | ||||
| @ -207,8 +207,8 @@ const pres = ref<President[]>([]); | ||||
| 
 | ||||
| /* Fetch and update the state once */ | ||||
| onMounted(async() => { | ||||
|   /* Download from https://sheetjs.com/pres.numbers */ | ||||
|   const f = await fetch("https://sheetjs.com/pres.numbers"); | ||||
|   /* Download from https://docs.sheetjs.com/pres.numbers */ | ||||
|   const f = await fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
|   const ab = await f.arrayBuffer(); | ||||
| 
 | ||||
|   // highlight-start | ||||
| @ -315,8 +315,8 @@ import { read, utils, writeFileXLSX } from 'xlsx'; | ||||
| const rows = ref([]); | ||||
| 
 | ||||
| onMounted(async() => { | ||||
|   /* Download from https://sheetjs.com/pres.numbers */ | ||||
|   const f = await fetch("https://sheetjs.com/pres.numbers"); | ||||
|   /* Download from https://docs.sheetjs.com/pres.numbers */ | ||||
|   const f = await fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
|   const ab = await f.arrayBuffer(); | ||||
| 
 | ||||
|   /* parse workbook */ | ||||
| @ -484,8 +484,8 @@ const html = ref(""); | ||||
| const tableau = ref(); | ||||
| 
 | ||||
| onMounted(async() => { | ||||
|   /* Download from https://sheetjs.com/pres.numbers */ | ||||
|   const f = await fetch("https://sheetjs.com/pres.numbers"); | ||||
|   /* Download from https://docs.sheetjs.com/pres.numbers */ | ||||
|   const f = await fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
|   const ab = await f.arrayBuffer(); | ||||
| 
 | ||||
|   /* parse workbook */ | ||||
|  | ||||
| @ -50,8 +50,8 @@ depends on the application. | ||||
| ### Array of Objects | ||||
| 
 | ||||
| Typically, some users will create a spreadsheet with source data that should be | ||||
| loaded into the site.  This sheet will have known columns.  For example, our | ||||
| [presidents sheet](https://sheetjs.com/pres.xlsx) has "Name" / "Index" columns: | ||||
| loaded into the site. This sheet will have known columns. For example, "Name" | ||||
| and "Index" are used in [`pres.xlsx`](https://docs.sheetjs.com/pres.xlsx): | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| @ -65,7 +65,7 @@ interface President { | ||||
|   Index: number; | ||||
| } | ||||
| 
 | ||||
| const f = await (await fetch("https://sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
| const f = await (await fetch("https://docs.sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
| const wb = read(f); | ||||
| const data = utils.sheet_to_json<President>(wb.Sheets[wb.SheetNames[0]]); | ||||
| console.log(data); | ||||
| @ -96,7 +96,7 @@ let pres = []; | ||||
| 
 | ||||
| /* Fetch and update the state once */ | ||||
| onMount(async() => { | ||||
|   const f = await (await fetch("https://sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
|   const f = await (await fetch("https://docs.sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
|   const wb = read(f); // parse the array buffer | ||||
|   const ws = wb.Sheets[wb.SheetNames[0]]; // get the first worksheet | ||||
|   // highlight-start | ||||
| @ -202,7 +202,7 @@ let tbl; | ||||
| 
 | ||||
| /* Fetch and update the state once */ | ||||
| onMount(async() => { | ||||
|   const f = await (await fetch("https://sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
|   const f = await (await fetch("https://docs.sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
|   const wb = read(f); // parse the array buffer | ||||
|   const ws = wb.Sheets[wb.SheetNames[0]]; // get the first worksheet | ||||
|   // highlight-start | ||||
|  | ||||
| @ -73,17 +73,17 @@ property to `"arraybuffer"` ensures the result is an `ArrayBuffer` object. | ||||
| The SheetJS [`read`](/docs/api/parse-options) method can parse the `ArrayBuffer` | ||||
| and return a SheetJS workbook object[^2]. | ||||
| 
 | ||||
| The following controller fetches [a sample file](https://sheetjs.com/pres.xlsx), | ||||
| This controller fetches [a sample file](https://docs.sheetjs.com/pres.xlsx), | ||||
| parses the result into a workbook, extracts the first worksheet, and uses the | ||||
| SheetJS [`sheet_to_html`](/docs/api/utilities/html#html-table-output) method to | ||||
| generate a HTML table: | ||||
| 
 | ||||
| ```js | ||||
| ```js title="Sample Controller" | ||||
| /* The controller function must accept a `$http` argument */ | ||||
| app.controller('sheetjs', function($scope, $http) { | ||||
|   /* fetch https://sheetjs.com/pres.xlsx */ | ||||
|   /* fetch https://docs.sheetjs.com/pres.xlsx */ | ||||
|   $http({ | ||||
|     method:'GET', url:'https://sheetjs.com/pres.xlsx', | ||||
|     method:'GET', url:'https://docs.sheetjs.com/pres.xlsx', | ||||
|     /* ensure the result is an ArrayBuffer object */ | ||||
|     responseType:'arraybuffer' | ||||
|   }).then(function(data) { | ||||
| @ -167,9 +167,9 @@ depends on the application. | ||||
| 
 | ||||
| ### Array of Objects | ||||
| 
 | ||||
| The example [presidents sheet](https://sheetjs.com/pres.xlsx) has one header row | ||||
| with "Name" and "Index" columns. The natural JS representation is an object for | ||||
| each row, using the values in the first rows as keys: | ||||
| The example [presidents sheet](https://docs.sheetjs.com/pres.xlsx) has one | ||||
| header row with "Name" and "Index" columns. The natural JS representation is an | ||||
| object for each row, using the values in the first rows as keys: | ||||
| 
 | ||||
| <table> | ||||
|   <thead><tr><th>Spreadsheet</th><th>State</th></tr></thead> | ||||
| @ -198,7 +198,7 @@ file, generates row objects, and stores the array in the state: | ||||
| ```js | ||||
| app.controller('sheetjs', function($scope, $http) { | ||||
|   $http({ | ||||
|     url:'https://sheetjs.com/pres.xlsx', | ||||
|     url:'https://docs.sheetjs.com/pres.xlsx', | ||||
|     method:'GET', responseType:'arraybuffer' | ||||
|   }).then(function(data) { | ||||
|     var wb = XLSX.read(data.data); | ||||
| @ -275,7 +275,7 @@ app.controller('sheetjs', function($scope, $http) { | ||||
|     XLSX.writeFile(wb, "SheetJSAngularJSAoO.xlsx"); | ||||
|   }; | ||||
|   $http({ | ||||
|     url:'https://sheetjs.com/pres.xlsx', | ||||
|     url:'https://docs.sheetjs.com/pres.xlsx', | ||||
|     method:'GET', responseType:'arraybuffer' | ||||
|   }).then(function(data) { | ||||
|     var wb = XLSX.read(data.data); | ||||
| @ -315,7 +315,7 @@ requires the `ngSanitize` plugin[^4]. | ||||
| var app = angular.module('s5s', ['ngSanitize']); | ||||
| app.controller('sheetjs', function($scope, $http) { | ||||
|   $http({ | ||||
|     url:'https://sheetjs.com/pres.xlsx', | ||||
|     url:'https://docs.sheetjs.com/pres.xlsx', | ||||
|     method:'GET', responseType:'arraybuffer' | ||||
|   }).then(function(data) { | ||||
|     var wb = XLSX.read(data.data); | ||||
| @ -371,7 +371,7 @@ app.controller('sheetjs', function($scope, $http) { | ||||
|     XLSX.writeFile(wb, "SheetJSAngularJSHTML.xlsx"); | ||||
|   }; | ||||
|   $http({ | ||||
|     url:'https://sheetjs.com/pres.xlsx', | ||||
|     url:'https://docs.sheetjs.com/pres.xlsx', | ||||
|     method:'GET', responseType:'arraybuffer' | ||||
|   }).then(function(data) { | ||||
|     var wb = XLSX.read(data.data); | ||||
|  | ||||
| @ -99,7 +99,7 @@ The following example generates a HTML table from the first worksheet: | ||||
| <div id="tbl"></div> | ||||
| <script> | ||||
| require(["dojo/request/xhr", "xlsx"], function(xhr, _XLSX) { | ||||
|   xhr("https://sheetjs.com/pres.numbers", { | ||||
|   xhr("https://docs.sheetjs.com/pres.numbers", { | ||||
|     headers: { "X-Requested-With": null }, | ||||
| // highlight-next-line | ||||
|     handleAs: "arraybuffer" | ||||
| @ -155,7 +155,7 @@ require([ | ||||
| ], function(ready, xhr, Memory, registry, _XLSX) { | ||||
|   ready(function() { | ||||
|     /* fetch test file */ | ||||
|     xhr("https://sheetjs.com/pres.xlsx", { | ||||
|     xhr("https://docs.sheetjs.com/pres.xlsx", { | ||||
|       headers: { "X-Requested-With": null }, | ||||
|       handleAs: "arraybuffer" | ||||
|     }).then(function(ab) { | ||||
|  | ||||
| @ -98,7 +98,7 @@ interface President { | ||||
| 
 | ||||
| async function xport() { | ||||
| /* fetch JSON data and parse */ | ||||
| const url = "https://sheetjs.com/data/executive.json"; | ||||
| const url = "https://docs.sheetjs.com/executive.json"; | ||||
| const raw_data: President[] = await (await fetch(url)).json(); | ||||
| 
 | ||||
| /* filter for the Presidents */ | ||||
|  | ||||
| @ -167,7 +167,7 @@ import { utils, version, writeFileXLSX } from 'xlsx'; | ||||
| 
 | ||||
| document.getElementById("xport").addEventListener("click", function() { | ||||
|   /* fetch JSON data and parse */ | ||||
|   var url = "https://sheetjs.com/data/executive.json"; | ||||
|   var url = "https://docs.sheetjs.com/executive.json"; | ||||
|   fetch(url).then(function(res) { return res.json(); }).then(function(raw_data) { | ||||
| 
 | ||||
|     /* filter for the Presidents */ | ||||
|  | ||||
| @ -105,7 +105,7 @@ const { utils, version, writeFileXLSX } = require('xlsx'); | ||||
| 
 | ||||
| document.getElementById("xport").addEventListener("click", function() { | ||||
|   /* fetch JSON data and parse */ | ||||
|   var url = "https://sheetjs.com/data/executive.json"; | ||||
|   var url = "https://docs.sheetjs.com/executive.json"; | ||||
|   fetch(url).then(function(res) { return res.json(); }).then(function(raw_data) { | ||||
| 
 | ||||
|     /* filter for the Presidents */ | ||||
|  | ||||
| @ -162,7 +162,7 @@ example, the following script corresponds to RequireJS `2.1.22`: | ||||
| require(["xlsx"], function(XLSX) { | ||||
|   document.getElementById("xport").addEventListener("click", function() { | ||||
|     /* fetch JSON data and parse */ | ||||
|     var url = "https://sheetjs.com/data/executive.json"; | ||||
|     var url = "https://docs.sheetjs.com/executive.json"; | ||||
|     fetch(url).then(function(res) { return res.json(); }).then(function(raw_data) { | ||||
| 
 | ||||
|     /* filter for the Presidents */ | ||||
|  | ||||
| @ -111,7 +111,7 @@ import { utils, version, writeFileXLSX } from 'xlsx'; | ||||
| 
 | ||||
| document.getElementById("xport").addEventListener("click", async() => { | ||||
| /* fetch JSON data and parse */ | ||||
| const url = "https://sheetjs.com/data/executive.json"; | ||||
| const url = "https://docs.sheetjs.com/executive.json"; | ||||
| const raw_data = await (await fetch(url)).json(); | ||||
| 
 | ||||
| /* filter for the Presidents */ | ||||
|  | ||||
| @ -86,7 +86,7 @@ import { utils, version, writeFileXLSX } from 'xlsx'; | ||||
| document.getElementById("vers").innerText = version; | ||||
| document.getElementById("xport").onclick = async() => { | ||||
|   /* fetch JSON data and parse */ | ||||
|   const url = "https://sheetjs.com/data/executive.json"; | ||||
|   const url = "https://docs.sheetjs.com/executive.json"; | ||||
|   const raw_data = await (await fetch(url)).json(); | ||||
| 
 | ||||
|   /* filter for the Presidents */ | ||||
| @ -146,7 +146,7 @@ import { utils, version, writeFileXLSX } from 'xlsx'; | ||||
| document.getElementById("vers").innerText = version; | ||||
| document.getElementById("xport").onclick = async() => { | ||||
|   /* fetch JSON data and parse */ | ||||
|   const url = "https://sheetjs.com/data/executive.json"; | ||||
|   const url = "https://docs.sheetjs.com/executive.json"; | ||||
|   const raw_data = await (await fetch(url)).json(); | ||||
| 
 | ||||
|   /* filter for the Presidents */ | ||||
|  | ||||
| @ -121,7 +121,7 @@ import { utils, version, writeFileXLSX } from 'xlsx'; | ||||
| 
 | ||||
| document.getElementById("xport").addEventListener("click", async() => { | ||||
| /* fetch JSON data and parse */ | ||||
| const url = "https://sheetjs.com/data/executive.json"; | ||||
| const url = "https://docs.sheetjs.com/executive.json"; | ||||
| const raw_data = await (await fetch(url)).json(); | ||||
| 
 | ||||
| /* filter for the Presidents */ | ||||
|  | ||||
| @ -102,7 +102,7 @@ import { utils, version, writeFileXLSX } from 'xlsx'; | ||||
| 
 | ||||
| document.getElementById("xport").addEventListener("click", async() => { | ||||
| /* fetch JSON data and parse */ | ||||
| const url = "https://sheetjs.com/data/executive.json"; | ||||
| const url = "https://docs.sheetjs.com/executive.json"; | ||||
| const raw_data = await (await fetch(url)).json(); | ||||
| 
 | ||||
| /* filter for the Presidents */ | ||||
| @ -232,7 +232,7 @@ import { utils, version, writeFileXLSX } from 'xlsx'; | ||||
| 
 | ||||
| document.getElementById("xport").addEventListener("click", async() => { | ||||
| /* fetch JSON data and parse */ | ||||
| const url = "https://sheetjs.com/data/executive.json"; | ||||
| const url = "https://docs.sheetjs.com/executive.json"; | ||||
| const raw_data = await (await fetch(url)).json(); | ||||
| 
 | ||||
| /* filter for the Presidents */ | ||||
|  | ||||
| @ -62,7 +62,7 @@ flowchart LR | ||||
| 
 | ||||
| ```js | ||||
| /* download data into an ArrayBuffer object */ | ||||
| const res = await fetch("https://sheetjs.com/pres.numbers"); | ||||
| const res = await fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
| const ab = await res.arrayBuffer(); // recover data as ArrayBuffer | ||||
| 
 | ||||
| /* parse file */ | ||||
| @ -71,10 +71,9 @@ const wb = XLSX.read(ab); | ||||
| 
 | ||||
| ## Browser Demos | ||||
| 
 | ||||
| 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] | ||||
| When the page is accessed, https://docs.sheetjs.com/pres.numbers will be fetched | ||||
| and parsed. The old table will be replaced with a table whose contents match the | ||||
| first worksheet. The SheetJS `sheet_to_html` method[^2] creates the HTML table. | ||||
| 
 | ||||
| :::note Tested Deployments | ||||
| 
 | ||||
| @ -111,7 +110,7 @@ req.send(); | ||||
| <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 fetch https://docs.sheetjs.com/pres.numbers | ||||
| and show the data in an HTML table. | ||||
| 
 | ||||
| ```jsx live | ||||
| @ -122,7 +121,7 @@ function SheetJSXHRDL() { | ||||
|   React.useEffect(() => { (async() => { | ||||
|     /* Fetch file */ | ||||
|     const req = new XMLHttpRequest(); | ||||
|     req.open("GET", "https://sheetjs.com/pres.numbers", true); | ||||
|     req.open("GET", "https://docs.sheetjs.com/pres.numbers", true); | ||||
|     req.responseType = "arraybuffer"; | ||||
|     req.onload = e => { | ||||
|       /* Parse file */ | ||||
| @ -164,8 +163,8 @@ fetch(url).then(function(res) { | ||||
| <details> | ||||
|   <summary><b>Live Download demo</b> (click to show)</summary> | ||||
| 
 | ||||
| This demo uses `fetch` to download https://sheetjs.com/pres.numbers and show | ||||
| the data in an HTML table. | ||||
| This demo uses `fetch` to download https://docs.sheetjs.com/pres.numbers and | ||||
| show the data in an HTML table. | ||||
| 
 | ||||
| ```jsx live | ||||
| function SheetJSFetchDL() { | ||||
| @ -174,7 +173,7 @@ function SheetJSFetchDL() { | ||||
|   /* Fetch and update HTML */ | ||||
|   React.useEffect(() => { (async() => { | ||||
|     /* Fetch file */ | ||||
|     const res = await fetch("https://sheetjs.com/pres.numbers"); | ||||
|     const res = await fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
|     const ab = await res.arrayBuffer(); | ||||
| 
 | ||||
|     /* Parse file */ | ||||
| @ -209,7 +208,7 @@ In a GET request, the default behavior is to return a `Blob` object.  Passing | ||||
| 
 | ||||
| ```js | ||||
| $.ajax({ | ||||
|   type: "GET", url: "https://sheetjs.com/pres.numbers", | ||||
|   type: "GET", url: "https://docs.sheetjs.com/pres.numbers", | ||||
| 
 | ||||
|   /* suppress jQuery post-processing */ | ||||
|   // highlight-next-line | ||||
| @ -259,8 +258,8 @@ async function workbook_dl_axios(url) { | ||||
| <details> | ||||
|   <summary><b>Live Download demo</b> (click to show)</summary> | ||||
| 
 | ||||
| This demo uses `axios` to download https://sheetjs.com/pres.numbers and show | ||||
| the data in an HTML table. | ||||
| This demo uses `axios` to download https://docs.sheetjs.com/pres.numbers and | ||||
| show the data in an HTML table. | ||||
| 
 | ||||
| :::caution pass | ||||
| 
 | ||||
| @ -282,7 +281,7 @@ function SheetJSAxiosDL() { | ||||
|   React.useEffect(() => { (async() => { | ||||
|     if(typeof axios != "function") return setHTML("ReferenceError: axios is not defined"); | ||||
|     /* Fetch file */ | ||||
|     const res = await axios("https://sheetjs.com/pres.numbers", {responseType: "arraybuffer"}); | ||||
|     const res = await axios("https://docs.sheetjs.com/pres.numbers", {responseType: "arraybuffer"}); | ||||
| 
 | ||||
|     /* Parse file */ | ||||
|     const wb = XLSX.read(res.data); | ||||
| @ -321,8 +320,8 @@ superagent | ||||
| <details> | ||||
|   <summary><b>Live Download demo</b> (click to show)</summary> | ||||
| 
 | ||||
| This demo uses `superagent` to download https://sheetjs.com/pres.numbers and | ||||
| show the data in an HTML table. | ||||
| This demo uses `superagent` to download https://docs.sheetjs.com/pres.numbers | ||||
| and show the data in an HTML table. | ||||
| 
 | ||||
| :::caution pass | ||||
| 
 | ||||
| @ -346,7 +345,7 @@ function SheetJSSuperAgentDL() { | ||||
|       return setHTML("ReferenceError: superagent is not defined"); | ||||
|     /* Fetch file */ | ||||
|     superagent | ||||
|       .get("https://sheetjs.com/pres.numbers") | ||||
|       .get("https://docs.sheetjs.com/pres.numbers") | ||||
|       .responseType("arraybuffer") | ||||
|       .end((err, res) => { | ||||
|         /* Parse file */ | ||||
| @ -375,7 +374,7 @@ The `https` module provides a low-level `get` method for HTTPS GET requests: | ||||
| ```js title="SheetJSHTTPSGet.js" | ||||
| var https = require("https"), XLSX = require("xlsx"); | ||||
| 
 | ||||
| https.get('https://sheetjs.com/pres.numbers', function(res) { | ||||
| https.get('https://docs.sheetjs.com/pres.numbers', function(res) { | ||||
|   var bufs = []; | ||||
|   res.on('data', function(chunk) { bufs.push(chunk); }); | ||||
|   res.on('end', function() { | ||||
| @ -465,7 +464,7 @@ async function parse_from_url(url) { | ||||
| } | ||||
| 
 | ||||
| (async() => { | ||||
|   const wb = await parse_from_url('https://sheetjs.com/pres.numbers'); | ||||
|   const wb = await parse_from_url('https://docs.sheetjs.com/pres.numbers'); | ||||
|   /* print the first worksheet to console */ | ||||
|   var ws = wb.Sheets[wb.SheetNames[0]]; | ||||
|   console.log(XLSX.utils.sheet_to_csv(ws)); | ||||
| @ -499,7 +498,7 @@ Setting the option `encoding: null` passes raw buffers: | ||||
| 
 | ||||
| ```js title="SheetJSRequest.js" | ||||
| var XLSX = require('xlsx'), request = require('request'); | ||||
| var url = 'https://sheetjs.com/pres.numbers'; | ||||
| var url = 'https://docs.sheetjs.com/pres.numbers'; | ||||
| 
 | ||||
| /* call `request` with the option `encoding: null` */ | ||||
| // highlight-next-line | ||||
| @ -587,7 +586,7 @@ async function workbook_dl_axios(url) { | ||||
| } | ||||
| 
 | ||||
| (async() => { | ||||
|   const wb = await workbook_dl_axios('https://sheetjs.com/pres.numbers'); | ||||
|   const wb = await workbook_dl_axios('https://docs.sheetjs.com/pres.numbers'); | ||||
|   /* print the first worksheet to console */ | ||||
|   var ws = wb.Sheets[wb.SheetNames[0]]; | ||||
|   console.log(XLSX.utils.sheet_to_csv(ws)); | ||||
|  | ||||
| @ -151,11 +151,11 @@ 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 | ||||
| commands should be run in a new terminal window: | ||||
| 4) Test POST requests using https://docs.sheetjs.com/pres.numbers . The commands | ||||
| should be run in a new terminal window: | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| curl -X POST -F upload=@pres.numbers http://localhost:3000/upload | ||||
| ``` | ||||
| 
 | ||||
|  | ||||
| @ -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://docs.sheetjs.com/pres.numbers | ||||
| 
 | ||||
| 4) Open `http://localhost:7262/` in your browser. | ||||
| 
 | ||||
|  | ||||
| @ -151,11 +151,11 @@ app.listen(3000); | ||||
| bun run src/SheetJSElysia.ts | ||||
| ``` | ||||
| 
 | ||||
| 5) Test POST requests using https://sheetjs.com/pres.numbers . The following | ||||
| commands should be run in a new terminal window: | ||||
| 5) Test POST requests using https://docs.sheetjs.com/pres.numbers . The commands | ||||
| should be run in a new terminal window: | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| curl -X POST -F upload=@pres.numbers http://localhost:3000/ | ||||
| ``` | ||||
| 
 | ||||
|  | ||||
| @ -209,11 +209,11 @@ npx @nestjs/cli start | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| 8) Test POST requests using https://sheetjs.com/pres.numbers . The following | ||||
| commands should be run in a new terminal window: | ||||
| 8) Test POST requests using https://docs.sheetjs.com/pres.numbers . The commands | ||||
| should be run in a new terminal window: | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| curl -X POST -F upload=@pres.numbers http://localhost:3000/sheetjs/upload | ||||
| ``` | ||||
| 
 | ||||
|  | ||||
| @ -166,11 +166,11 @@ 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 | ||||
| commands should be run in a new terminal window: | ||||
| 3) Test POST requests using https://docs.sheetjs.com/pres.numbers . The commands | ||||
| should be run in a new terminal window: | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| curl -X POST -F upload=@pres.numbers http://localhost:3000/ | ||||
| ``` | ||||
| 
 | ||||
|  | ||||
| @ -230,11 +230,11 @@ node main.mjs | ||||
| 
 | ||||
| Keep the server process running during the test. | ||||
| 
 | ||||
| 6) Test with the [`pres.numbers` sample file](https://sheetjs.com/pres.numbers). | ||||
| 6) Test with the [`pres.numbers` sample file](https://docs.sheetjs.com/pres.numbers). | ||||
| The following commands should be run in a new terminal window: | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| curl -X POST -F upload=@pres.numbers http://localhost:7262/ -J -O | ||||
| ``` | ||||
| 
 | ||||
|  | ||||
| @ -378,9 +378,9 @@ 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 | ||||
| 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. | ||||
| 4) Download https://docs.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. | ||||
| 
 | ||||
| 5) Run the script: | ||||
| 
 | ||||
|  | ||||
| @ -16,7 +16,7 @@ With a familiar UI, `x-spreadsheet` is an excellent choice for a modern editor. | ||||
| 
 | ||||
| :::note Tested Deployments | ||||
| 
 | ||||
| This demo was last verified on 2023 December 04. | ||||
| This demo was last verified on 2024 April 25. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -33,7 +33,7 @@ features like scrolling may not work as expected. | ||||
| 
 | ||||
| ```jsx live | ||||
| function SheetJSXSpread() { | ||||
|   const [url, setUrl] = React.useState("https://sheetjs.com/pres.numbers"); | ||||
|   const [url, setUrl] = React.useState("https://docs.sheetjs.com/pres.numbers"); | ||||
|   const [done, setDone] = React.useState(false); | ||||
|   const ref = React.useRef(); // ref to DIV container | ||||
|   const set_url = (evt) => setUrl(evt.target.value); | ||||
| @ -72,7 +72,7 @@ The following snippet fetches a spreadsheet and loads the grid: | ||||
| 
 | ||||
| ```js | ||||
| (async() => { | ||||
|   const ab = await (await fetch("https://sheetjs.com/pres.numbers")).arrayBuffer(); | ||||
|   const ab = await (await fetch("https://docs.sheetjs.com/pres.numbers")).arrayBuffer(); | ||||
|   grid.loadData(stox(XLSX.read(ab))); | ||||
| })(); | ||||
| ``` | ||||
|  | ||||
| @ -15,7 +15,7 @@ with a straightforward API. | ||||
| 
 | ||||
| :::note Tested Deployments | ||||
| 
 | ||||
| This demo was last verified on 2023 December 04. | ||||
| This demo was last verified on 2024 April 25. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -32,7 +32,7 @@ features like scrolling may not work as expected. | ||||
| 
 | ||||
| ```jsx live | ||||
| function SheetJSCDG() { | ||||
|   const [url, setUrl] = React.useState("https://sheetjs.com/pres.numbers"); | ||||
|   const [url, setUrl] = React.useState("https://docs.sheetjs.com/pres.numbers"); | ||||
|   const [done, setDone] = React.useState(false); | ||||
|   const ref = React.useRef(); // ref to DIV container | ||||
|   const set_url = (evt) => setUrl(evt.target.value); | ||||
|  | ||||
| @ -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://docs.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 | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| The demo downloads and processes https://sheetjs.com/pres.numbers. | ||||
| The demo downloads and processes https://docs.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 | ||||
| with SheetJS, and load the data in the data grid. | ||||
| 5) When the page loads, it will fetch https://docs.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 process https://docs.sheetjs.com/pres.numbers | ||||
|  | ||||
| @ -57,8 +57,8 @@ The lines are automatically added if `sheets` plugin is enabled during setup. | ||||
| Spreadsheet files added in the `_data` subdirectory are accessible from template | ||||
| files using the name stem. | ||||
| 
 | ||||
| For example, [`pres.xlsx`](https://sheetjs.com/pres.xlsx) can be accessed using | ||||
| the variable `pres` in a template. | ||||
| For example, [`pres.xlsx`](https://docs.sheetjs.com/pres.xlsx) can be accessed | ||||
| using the variable `pres` in a template. | ||||
| 
 | ||||
| #### Single-Sheet Workbooks | ||||
| 
 | ||||
| @ -168,11 +168,11 @@ 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://docs.sheetjs.com/pres.xlsx and place in a `_data` subfolder: | ||||
| 
 | ||||
| ```bash | ||||
| mkdir -p _data | ||||
| curl -L -o _data/pres.xlsx https://sheetjs.com/pres.xlsx | ||||
| curl -L -o _data/pres.xlsx https://docs.sheetjs.com/pres.xlsx | ||||
| ``` | ||||
| 
 | ||||
| 3) Create a `index.njk` file that references the file: | ||||
|  | ||||
| @ -255,12 +255,12 @@ 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://docs.sheetjs.com/pres.xlsx, and | ||||
| move the downloaded file into the new folder: | ||||
| 
 | ||||
| ```bash | ||||
| mkdir -p src/data | ||||
| curl -L -o src/data/pres.xlsx https://sheetjs.com/pres.xlsx | ||||
| curl -L -o src/data/pres.xlsx https://docs.sheetjs.com/pres.xlsx | ||||
| ``` | ||||
| 
 | ||||
| 6) Edit `gatsby-config.js` and add the following lines to the `plugins` array: | ||||
|  | ||||
| @ -271,10 +271,10 @@ 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://docs.sheetjs.com/pres.numbers to the project folder: | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| ``` | ||||
| 
 | ||||
| ### Static Site Test | ||||
|  | ||||
| @ -227,11 +227,11 @@ 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://docs.sheetjs.com/pres.xlsx : | ||||
| 
 | ||||
| ```bash | ||||
| mkdir -p data | ||||
| curl -L -o data/pres.xlsx https://sheetjs.com/pres.xlsx | ||||
| curl -L -o data/pres.xlsx https://docs.sheetjs.com/pres.xlsx | ||||
| ``` | ||||
| 
 | ||||
| ### Pure Data Test | ||||
|  | ||||
| @ -285,10 +285,10 @@ loader.raw = true; | ||||
| module.exports = loader; | ||||
| ``` | ||||
| 
 | ||||
| 6) Download https://sheetjs.com/pres.xlsx and save to the `data` folder: | ||||
| 6) Download https://docs.sheetjs.com/pres.xlsx and save to the `data` folder: | ||||
| 
 | ||||
| ```bash | ||||
| curl -L -o data/pres.xlsx https://sheetjs.com/pres.xlsx | ||||
| curl -L -o data/pres.xlsx https://docs.sheetjs.com/pres.xlsx | ||||
| ``` | ||||
| 
 | ||||
| ### Live Reload Test | ||||
|  | ||||
| @ -91,8 +91,8 @@ module.exports = (eleventyConfig) => { | ||||
| Spreadsheet files added in the `_data` subdirectory are accessible from template | ||||
| files using the name stem. | ||||
| 
 | ||||
| For example, [`pres.numbers`](https://sheetjs.com/pres.numbers) can be accessed | ||||
| using the variable `pres` in a template: | ||||
| For example, [`pres.numbers`](https://docs.sheetjs.com/pres.numbers) can be | ||||
| accessed using the variable `pres` in a template: | ||||
| 
 | ||||
| ```liquid title="index.njk" | ||||
| <table><thead><tr><th>Name</th><th>Index</th></tr></thead> | ||||
| @ -151,11 +151,11 @@ npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz @11ty/e | ||||
| </Tabs> | ||||
| 
 | ||||
| 3) Make a new `_data` subdirectory in the project. Download the example file | ||||
| [`pres.xlsx`](https://sheetjs.com/pres.xlsx) into `_data`: | ||||
| [`pres.xlsx`](https://docs.sheetjs.com/pres.xlsx) into `_data`: | ||||
| 
 | ||||
| ```bash | ||||
| mkdir _data | ||||
| curl -Lo _data/pres.xlsx https://sheetjs.com/pres.xlsx | ||||
| curl -Lo _data/pres.xlsx https://docs.sheetjs.com/pres.xlsx | ||||
| ``` | ||||
| 
 | ||||
| 4) Download the following files to the project folder: | ||||
|  | ||||
| @ -296,10 +296,10 @@ 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://docs.sheetjs.com/pres.xlsx and move to the `content` folder. | ||||
| 
 | ||||
| ```bash | ||||
| curl -L -o content/pres.xlsx https://sheetjs.com/pres.xlsx | ||||
| curl -L -o content/pres.xlsx https://docs.sheetjs.com/pres.xlsx | ||||
| ``` | ||||
| 
 | ||||
| 4) Modify `nuxt.config.js` as follows: | ||||
| @ -615,10 +615,10 @@ 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://docs.sheetjs.com/pres.xlsx and move to the `content` folder. | ||||
| 
 | ||||
| ```bash | ||||
| curl -L -o content/pres.xlsx https://sheetjs.com/pres.xlsx | ||||
| curl -L -o content/pres.xlsx https://docs.sheetjs.com/pres.xlsx | ||||
| ``` | ||||
| 
 | ||||
| 4) Create the transformer. Two files must be saved at the root of the project: | ||||
|  | ||||
| @ -205,12 +205,12 @@ cd sheetjs-svelte | ||||
| npm i | ||||
| ``` | ||||
| 
 | ||||
| 3) Fetch the example file [`pres.xlsx`](https://sheetjs.com/pres.xlsx) and move | ||||
| to a `data` subdirectory in the root of the project: | ||||
| 3) Fetch the example file [`pres.xlsx`](https://docs.sheetjs.com/pres.xlsx) and | ||||
| move to a `data` subdirectory in the root of the project: | ||||
| 
 | ||||
| ```bash | ||||
| mkdir -p data | ||||
| curl -Lo data/pres.xlsx https://sheetjs.com/pres.xlsx | ||||
| curl -Lo data/pres.xlsx https://docs.sheetjs.com/pres.xlsx | ||||
| ``` | ||||
| 
 | ||||
| 4) Install the SheetJS library: | ||||
|  | ||||
| @ -229,11 +229,11 @@ npx astro --version | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| 2) Fetch the example file [`pres.numbers`](https://sheetjs.com/pres.numbers): | ||||
| 2) Fetch the example file [`pres.numbers`](https://docs.sheetjs.com/pres.numbers): | ||||
| 
 | ||||
| ```bash | ||||
| mkdir -p src/data | ||||
| curl -Lo src/data/pres.numbers https://sheetjs.com/pres.numbers | ||||
| curl -Lo src/data/pres.numbers https://docs.sheetjs.com/pres.numbers | ||||
| ``` | ||||
| 
 | ||||
| 3) Install the SheetJS library: | ||||
|  | ||||
| @ -207,11 +207,11 @@ 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://docs.sheetjs.com/pres.xlsx: | ||||
| 
 | ||||
| ```js | ||||
| /* fetch data into an ArrayBuffer */ | ||||
| const ab = await (await fetch("https://sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
| const ab = await (await fetch("https://docs.sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
| /* parse data */ | ||||
| const wb = XLSX.read(ab); | ||||
| ``` | ||||
| @ -1202,7 +1202,7 @@ npx react-native doctor | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| 8) Download https://sheetjs.com/pres.numbers and open the Downloads folder. | ||||
| 8) Download https://docs.sheetjs.com/pres.numbers and open the Downloads folder. | ||||
| 
 | ||||
| 9) Click and drag `pres.numbers` from the Downloads folder into the simulator. | ||||
| 
 | ||||
| @ -1282,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://docs.sheetjs.com/pres.numbers and open the Downloads folder. | ||||
| 
 | ||||
| 18) In the simulator, click the Home icon to return to the home screen. | ||||
| 
 | ||||
| @ -1358,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://docs.sheetjs.com/pres.numbers on the device. | ||||
| 
 | ||||
| 31) Switch back to the "SheetJSRN" app. | ||||
| 
 | ||||
| @ -1447,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://docs.sheetjs.com/pres.numbers on the device. | ||||
| 
 | ||||
| 42) Switch back to the "SheetJSRN" app. | ||||
| 
 | ||||
|  | ||||
| @ -248,7 +248,7 @@ import { read } from 'xlsx'; | ||||
| const temp: string = path.join(knownFolders.temp().path, "pres.xlsx"); | ||||
| 
 | ||||
| /* download file */ | ||||
| const file = await getFile("https://sheetjs.com/pres.xlsx", temp) | ||||
| const file = await getFile("https://docs.sheetjs.com/pres.xlsx", temp) | ||||
| 
 | ||||
| /* get data */ | ||||
| const ab: ArrayBuffer = await getFileAccess().readBufferAsync(file.path); | ||||
| @ -684,9 +684,9 @@ export class ItemService { | ||||
|   private items: Array<Item>; | ||||
| 
 | ||||
|   async getItems(): Promise<Array<Item>> { | ||||
|     /* fetch https://sheetjs.com/pres.xlsx */ | ||||
|     /* fetch https://docs.sheetjs.com/pres.xlsx */ | ||||
|     const temp: string = path.join(knownFolders.temp().path, "pres.xlsx"); | ||||
|     const ab = await getFile("https://sheetjs.com/pres.xlsx", temp) | ||||
|     const ab = await getFile("https://docs.sheetjs.com/pres.xlsx", temp) | ||||
|     /* read the temporary file */ | ||||
|     const wb = read(await getFileAccess().readBufferAsync(ab.path)); | ||||
|     /* translate the first worksheet to the required Item type */ | ||||
|  | ||||
| @ -356,7 +356,7 @@ export default defineComponent({ | ||||
| 
 | ||||
| To test that reading works: | ||||
| 
 | ||||
| - Download https://sheetjs.com/pres.numbers | ||||
| - Download https://docs.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. | ||||
|  | ||||
| @ -193,7 +193,7 @@ this.file.writeFile(url, filename, blob, {replace: true}); | ||||
| 
 | ||||
| The app in this demo will display data in a table. | ||||
| 
 | ||||
| On load, a [test file](https://sheetjs.com/pres.numbers) will be processed. | ||||
| On load, a [test file](https://docs.sheetjs.com/pres.numbers) will be processed. | ||||
| 
 | ||||
| When a document is selected with the file picker, it will be processed and the | ||||
| table will refresh to show the contents. | ||||
|  | ||||
| @ -443,8 +443,8 @@ 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 | ||||
| array of arrays, and presents the data in a Flutter `Table` widget. | ||||
| The app fetches https://docs.sheetjs.com/pres.numbers, parses, converts data to | ||||
| an array of arrays, and presents the data in a Flutter `Table` widget. | ||||
| 
 | ||||
| :::caution pass | ||||
| 
 | ||||
| @ -488,8 +488,8 @@ Searching for `minSdkVersion` should reveal the following line: | ||||
| flutter run | ||||
| ``` | ||||
| 
 | ||||
| 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. | ||||
| The app fetches https://docs.sheetjs.com/pres.numbers, parses, converts data to | ||||
| an array of arrays, and presents the data in a Flutter `Table` widget. | ||||
| 
 | ||||
| ### Android Device | ||||
| 
 | ||||
|  | ||||
| @ -268,7 +268,7 @@ The program will run on ARM64 Windows. | ||||
| 
 | ||||
| ### Testing | ||||
| 
 | ||||
| 5) Download [the test file `pres.numbers`](https://sheetjs.com/pres.numbers) | ||||
| 5) Download [the test file `pres.numbers`](https://docs.sheetjs.com/pres.numbers) | ||||
| 
 | ||||
| 6) Launch the generated application: | ||||
| 
 | ||||
|  | ||||
| @ -404,7 +404,7 @@ It will print the path to the generated program (typically in `build/bin/`). | ||||
| 
 | ||||
| **Testing** | ||||
| 
 | ||||
| The program will download [`pres.xlsx`](https://sheetjs.com/pres.xlsx) and | ||||
| The program will download [`pres.xlsx`](https://docs.sheetjs.com/pres.xlsx) and | ||||
| display the contents of the first worksheet in a table. | ||||
| 
 | ||||
| To test export features, click "Export XLSX". The app will ask for a file name | ||||
|  | ||||
| @ -620,7 +620,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://docs.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. | ||||
|  | ||||
| @ -329,7 +329,7 @@ npx @neutralinojs/neu run | ||||
| 
 | ||||
| ```js title="resources/js/main.js (add to end)" | ||||
| (async() => { | ||||
|   const ab = await (await fetch("https://sheetjs.com/pres.numbers")).arrayBuffer(); | ||||
|   const ab = await (await fetch("https://docs.sheetjs.com/pres.numbers")).arrayBuffer(); | ||||
|   const wb = XLSX.read(ab); | ||||
|   const ws = wb.Sheets[wb.SheetNames[0]]; | ||||
|   document.getElementById('info').innerHTML = XLSX.utils.sheet_to_html(ws); | ||||
|  | ||||
| @ -633,7 +633,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://docs.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. | ||||
| @ -916,7 +916,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://docs.sheetjs.com/pres.xlsx to the Downloads folder. | ||||
| 
 | ||||
| #### Development | ||||
| 
 | ||||
|  | ||||
| @ -222,10 +222,10 @@ local NodeJS platform. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| 4) Download the test file https://sheetjs.com/pres.numbers: | ||||
| 4) Download the test file https://docs.sheetjs.com/pres.numbers: | ||||
| 
 | ||||
| ```bash | ||||
| curl -o pres.numbers https://sheetjs.com/pres.numbers | ||||
| curl -o pres.numbers https://docs.sheetjs.com/pres.numbers | ||||
| ``` | ||||
| 
 | ||||
| 5) Run the script and pass `pres.numbers` as the first argument: | ||||
|  | ||||
| @ -111,10 +111,10 @@ 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://docs.sheetjs.com/pres.numbers: | ||||
| 
 | ||||
| ```bash | ||||
| curl -o pres.numbers https://sheetjs.com/pres.numbers | ||||
| curl -o pres.numbers https://docs.sheetjs.com/pres.numbers | ||||
| ``` | ||||
| 
 | ||||
| 2) Test the script with `deno run`: | ||||
|  | ||||
| @ -124,10 +124,10 @@ This demo was tested in the following deployments: | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| 0) Download the test file https://sheetjs.com/pres.numbers: | ||||
| 0) Download the test file https://docs.sheetjs.com/pres.numbers: | ||||
| 
 | ||||
| ```bash | ||||
| curl -o pres.numbers https://sheetjs.com/pres.numbers | ||||
| curl -o pres.numbers https://docs.sheetjs.com/pres.numbers | ||||
| ``` | ||||
| 
 | ||||
| 1) Download [`xlsx-cli.js`](pathname:///cli/xlsx-cli.js) | ||||
| @ -437,10 +437,10 @@ 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://docs.sheetjs.com/pres.numbers: | ||||
| 
 | ||||
| ```bash | ||||
| curl -o pres.numbers https://sheetjs.com/pres.numbers | ||||
| curl -o pres.numbers https://docs.sheetjs.com/pres.numbers | ||||
| ``` | ||||
| 
 | ||||
| 6) Test the application: | ||||
|  | ||||
| @ -16,7 +16,7 @@ commands to database servers. | ||||
| 
 | ||||
| ### Generating Tables | ||||
| 
 | ||||
| This example will fetch https://sheetjs.com/data/cd.xls, scan the columns of the | ||||
| This example will fetch https://docs.sheetjs.com/cd.xls, scan the columns of the | ||||
| first worksheet to determine data types, and generate 6 PostgreSQL statements. | ||||
| 
 | ||||
| <details> | ||||
| @ -124,7 +124,7 @@ function SheetJSQLWriter() { | ||||
|       if(fields.length) return `INSERT INTO \`${wsname}\` (${fields.join(", ")}) VALUES (${values.join(", ")})`; | ||||
|     })).filter(x => x).slice(0, 6); | ||||
|   } | ||||
|   const [url, setUrl] = React.useState("https://sheetjs.com/data/cd.xls"); | ||||
|   const [url, setUrl] = React.useState("https://docs.sheetjs.com/cd.xls"); | ||||
|   const set_url = (evt) => setUrl(evt.target.value); | ||||
|   const [out, setOut] = React.useState(""); | ||||
|   const xport = React.useCallback(async() => { | ||||
|  | ||||
| @ -197,10 +197,10 @@ npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz knex sq | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| 2) Download the [test file](https://sheetjs.com/pres.numbers) | ||||
| 2) Download the [test file](https://docs.sheetjs.com/pres.numbers) | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| ``` | ||||
| 
 | ||||
| 3) Download [`SheetJSKnexTest.js`](pathname:///knex/SheetJSKnexTest.js): | ||||
|  | ||||
| @ -379,10 +379,10 @@ correct host name and port number. | ||||
| - If the server expects a different username and password, uncomment the `user` | ||||
| and `password` lines and replace the values with the username and password. | ||||
| 
 | ||||
| 11) Fetch the example file [`pres.numbers`](https://sheetjs.com/pres.numbers): | ||||
| 11) Fetch the example file [`pres.numbers`](https://docs.sheetjs.com/pres.numbers): | ||||
| 
 | ||||
| ```bash | ||||
| curl -L -O https://sheetjs.com/pres.numbers | ||||
| curl -L -O https://docs.sheetjs.com/pres.numbers | ||||
| ``` | ||||
| 
 | ||||
| 12) Run the script: | ||||
|  | ||||
| @ -365,10 +365,10 @@ correct host name and port number. | ||||
| - If the server expects a password, uncomment the `password` line and replace | ||||
| the value with the password. | ||||
| 
 | ||||
| 11) Fetch the example file [`pres.numbers`](https://sheetjs.com/pres.numbers): | ||||
| 11) Fetch the example file [`pres.numbers`](https://docs.sheetjs.com/pres.numbers): | ||||
| 
 | ||||
| ```bash | ||||
| curl -L -O https://sheetjs.com/pres.numbers | ||||
| curl -L -O https://docs.sheetjs.com/pres.numbers | ||||
| ``` | ||||
| 
 | ||||
| 12) Run the script: | ||||
|  | ||||
| @ -37,9 +37,9 @@ This demo was tested in the following environments: | ||||
| 
 | ||||
| ## Live Demo | ||||
| 
 | ||||
| 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. | ||||
| This demo fetches https://docs.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> | ||||
| @ -77,7 +77,7 @@ please refresh the page.  This is a known bug in the documentation generator. | ||||
| function SheetJSAlaSQL() { | ||||
|   const q1 = "SELECT `Index`, UPPER(`Name`) AS `Nom` FROM XLSX(?,{autoExt:false})"; | ||||
|   const q2 = `SELECT * INTO XLSX("SheetJSAlaSQL.xlsx") FROM ?`; | ||||
|   const url = "https://sheetjs.com/pres.numbers"; | ||||
|   const url = "https://docs.sheetjs.com/pres.numbers"; | ||||
|   const [rows, setRows] = React.useState([]); | ||||
|   const loadURL = React.useCallback(async() => { | ||||
|     if(typeof alasql=="undefined") return setRows([{Nom:"alasql undefined"}]); | ||||
| @ -151,7 +151,7 @@ URLs which can be created from `Blob` or `File` objects. | ||||
| The following snippet fetches data and passes to AlaSQL: | ||||
| 
 | ||||
| ```js | ||||
| const blob = await (await fetch("https://sheetjs.com/pres.numbers")).blob(); | ||||
| const blob = await (await fetch("https://docs.sheetjs.com/pres.numbers")).blob(); | ||||
| const data = URL.createObjectURL(blob); | ||||
| const res = await alasql.promise("SELECT * FROM XLSX(?, {autoExt: false}", [data]); | ||||
| ``` | ||||
| @ -174,7 +174,7 @@ By default the workbook is parsed and `sheet_to_json` is used to pull data: | ||||
| 
 | ||||
| ```js | ||||
| (async() => { | ||||
|   const blob = await (await fetch("https://sheetjs.com/pres.numbers")).blob(); | ||||
|   const blob = await (await fetch("https://docs.sheetjs.com/pres.numbers")).blob(); | ||||
|   const data = URL.createObjectURL(blob); | ||||
|   const aoo = await alasql.promise("SELECT * FROM XLSX(?, {autoExt: false}", [data]); | ||||
|   console.log(aoo); // [ { Name: "Bill Clinton", Index: 42 }, ...] | ||||
| @ -283,10 +283,10 @@ 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://docs.sheetjs.com/pres.numbers : | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| ``` | ||||
| 
 | ||||
| 5) Save the following test script to `SheetJSAlaSQL.js`: | ||||
|  | ||||
| @ -81,7 +81,7 @@ function localStorage_to_sheet() { | ||||
| 
 | ||||
| ### Live Demo | ||||
| 
 | ||||
| This example will fetch https://sheetjs.com/pres.numbers, fill `localStorage` | ||||
| This demo will fetch https://docs.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 | ||||
| @ -101,7 +101,7 @@ is strongly recommended to convert that array to a worksheet directly. | ||||
| 
 | ||||
| ```jsx live | ||||
| function SheetJStorage() { | ||||
|   const [url, setUrl] = React.useState("https://sheetjs.com/pres.numbers"); | ||||
|   const [url, setUrl] = React.useState("https://docs.sheetjs.com/pres.numbers"); | ||||
|   const set_url = (evt) => setUrl(evt.target.value); | ||||
|   const [out, setOut] = React.useState(""); | ||||
|   const xport = React.useCallback(async() => { | ||||
|  | ||||
| @ -335,13 +335,13 @@ 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 | ||||
| public function URL. | ||||
| 21) Download https://docs.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: | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| curl -X POST -F "upload=@pres.numbers" FUNCTION_URL | ||||
| ``` | ||||
| 
 | ||||
|  | ||||
| @ -314,11 +314,11 @@ 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 | ||||
| and make a POST request to the dev server: | ||||
| 11) In a new terminal window, download https://docs.sheetjs.com/pres.numbers and | ||||
| make a POST request to the dev server: | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| curl -X POST -F "upload=@pres.numbers" http://localhost:7071/api/SheetJSAzure | ||||
| ``` | ||||
| 
 | ||||
| @ -391,12 +391,12 @@ Take note of that URL. | ||||
| #### Remote Test | ||||
| 
 | ||||
| 
 | ||||
| 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: | ||||
| 22) In a new terminal window, download https://docs.sheetjs.com/pres.numbers and | ||||
| make a POST request to the production server. Replace `FUNCTION_URL` with the | ||||
| Invoke URL from Step 21: | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| curl -X POST -F "upload=@pres.numbers" FUNCTION_URL | ||||
| ``` | ||||
| 
 | ||||
|  | ||||
| @ -105,16 +105,16 @@ show "SheetJS Spreadsheet Conversion Service": | ||||
| 
 | ||||
| >  | ||||
| 
 | ||||
| 8) Download the test file https://sheetjs.com/pres.xlsx | ||||
| 8) Download the test file https://docs.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://docs.sheetjs.com/pres.numbers: | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| ``` | ||||
| 
 | ||||
| 12) Copy the first `curl` line from the page and run in the terminal. For | ||||
|  | ||||
| @ -535,10 +535,10 @@ NUMBERS file. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| 34) Download the [test file `pres.numbers`](https://sheetjs.com/pres.numbers): | ||||
| 34) Download the [test file `pres.numbers`](https://docs.sheetjs.com/pres.numbers): | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| ``` | ||||
| 
 | ||||
| 35) Save the following script to `load.mjs`: | ||||
|  | ||||
| @ -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://docs.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". | ||||
|  | ||||
| @ -234,7 +234,7 @@ function SheetJSEnregistrez() { | ||||
|   React.useEffect(() => { (async() => { | ||||
|     if(typeof Dropbox == "undefined") return setMsg("Dropbox is not defined"); | ||||
|     /* fetch data and write table (sample data) */ | ||||
|     const f = await(await fetch("https://sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
|     const f = await(await fetch("https://docs.sheetjs.com/pres.xlsx")).arrayBuffer(); | ||||
|     const wb = XLSX.read(f); | ||||
|     tbl.current.innerHTML = XLSX.utils.sheet_to_html(wb.Sheets[wb.SheetNames[0]]); | ||||
| 
 | ||||
|  | ||||
| @ -114,7 +114,7 @@ the Layers window is "Title")  will be set to the name of the first worksheet. | ||||
| 
 | ||||
| - The data from the first sheet will be added to the "Table Frame" TextFrame. | ||||
| 
 | ||||
| 0) Download the [test workbook](https://sheetjs.com/pres.xlsx) and | ||||
| 0) Download the [test workbook](https://docs.sheetjs.com/pres.xlsx) and | ||||
| [InDesign template](pathname:///extendscript/Template.idml) | ||||
| 
 | ||||
| 1) Download the following scripts and move to the scripts directory[^4]: | ||||
| @ -295,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 the [test workbook](https://docs.sheetjs.com/pres.xlsx) | ||||
| 
 | ||||
| 4) Show the extension (in the menu bar, select Window > Extensions > SheetJS) | ||||
| 
 | ||||
| @ -409,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 the [test workbook](https://docs.sheetjs.com/pres.xlsx) | ||||
| 
 | ||||
| 4) In the Scripts Panel, double-click "parse". Select the downloaded `pres.xlsx` | ||||
| in the file picker. | ||||
|  | ||||
| @ -272,8 +272,8 @@ export async function extern(url) { | ||||
| 16) After making the change, save the files.  Close the terminal window and the | ||||
| Excel window (do not save the Excel file).  Re-run `npm start`. | ||||
| 
 | ||||
| 17) Enter the text `https://sheetjs.com/pres.numbers` in cell `D1`.  Enter the | ||||
| formula `=SHEETJS.EXTERN(D1)` in cell `D2` and press Enter. | ||||
| 17) Enter the text `https://docs.sheetjs.com/pres.numbers` in cell `D1`. Enter | ||||
| the formula `=SHEETJS.EXTERN(D1)` in cell `D2` and press Enter. | ||||
| 
 | ||||
| Excel should pull in the data and generate a dynamic array. The worksheet should | ||||
| match the screenshot at the top of this page. | ||||
|  | ||||
| @ -54,7 +54,7 @@ The [Complete Demo](#complete-demo) includes more detailed setup instructions. | ||||
| `UrlFetchApp.fetch` performs a network request and returns a `HTTPResponse`: | ||||
| 
 | ||||
| ```js | ||||
| const response = UrlFetchApp.fetch("https://sheetjs.com/pres.numbers"); | ||||
| const response = UrlFetchApp.fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
| ``` | ||||
| 
 | ||||
| `HTTPResponse#getContent` returns the file data as an array of *signed* bytes: | ||||
| @ -194,7 +194,7 @@ Replace with the following function: | ||||
| ```js title="Code.gs" | ||||
| function SHEETJS(url) { | ||||
|   /* fetch data */ | ||||
|   const res = UrlFetchApp.fetch(url || "https://sheetjs.com/pres.numbers"); | ||||
|   const res = UrlFetchApp.fetch(url || "https://docs.sheetjs.com/pres.numbers"); | ||||
|   const content = res.getContent(); | ||||
| 
 | ||||
|   /* fix data */ | ||||
| @ -215,7 +215,7 @@ Click the "Save Project" icon (💾) to save the project. | ||||
| 11) In the Google Sheets window, select cell A1 and enter the formula | ||||
| 
 | ||||
| ``` | ||||
| =SHEETJS("https://sheetjs.com/pres.numbers") | ||||
| =SHEETJS("https://docs.sheetjs.com/pres.numbers") | ||||
| ``` | ||||
| 
 | ||||
| The file will be fetched and the contents will be written to the sheet. | ||||
|  | ||||
| @ -156,11 +156,11 @@ the project directory: | ||||
| 
 | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
|  | ||||
| @ -181,8 +181,8 @@ If NodeJS is registered, the value in the "Registered" column will be "True". | ||||
| ExternalEvaluate["NodeJS", "require('process').cwd()"] | ||||
| ``` | ||||
| 
 | ||||
| 5) Download [`pres.numbers`](https://sheetjs.com/pres.numbers) and move the file | ||||
| to the base folder as shown in the previous step. | ||||
| 5) Download [`pres.numbers`](https://docs.sheetjs.com/pres.numbers) and move | ||||
| the file to the base folder as shown in the previous step. | ||||
| 
 | ||||
| 6) Copy and evaluate the "Complete Function" in the previous codeblock. | ||||
| 
 | ||||
| @ -301,11 +301,11 @@ The `\` characters must be doubled. | ||||
|   </TabItem> | ||||
| </Tabs> | ||||
| 
 | ||||
| 4) Download https://sheetjs.com/pres.numbers and save to Downloads folder: | ||||
| 4) Download https://docs.sheetjs.com/pres.numbers and save to Downloads folder: | ||||
| 
 | ||||
| ```bash | ||||
| cd ~/Downloads/ | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| ``` | ||||
| 
 | ||||
| 5) In the Mathematica notebook, run the new function. If the file was saved to | ||||
| @ -337,7 +337,7 @@ SheetJSImportURL[x_] := Module[{path},( | ||||
| 7) Test by downloading the test file in the notebook: | ||||
| 
 | ||||
| ```mathematica | ||||
| data = SheetJSImportURL["https://sheetjs.com/pres.numbers"] | ||||
| data = SheetJSImportURL["https://docs.sheetjs.com/pres.numbers"] | ||||
| ``` | ||||
| 
 | ||||
|  | ||||
|  | ||||
| @ -32,7 +32,7 @@ flowchart LR | ||||
|   nfile --> |Stata command\nimport excel|data | ||||
| ``` | ||||
| 
 | ||||
| The demo will read [a Numbers workbook](https://sheetjs.com/pres.numbers) and | ||||
| The demo will read [a Numbers workbook](https://docs.sheetjs.com/pres.numbers) and | ||||
| generate variables for each column. A sample Stata session is shown below: | ||||
| 
 | ||||
|  | ||||
| @ -52,6 +52,7 @@ This demo was tested by SheetJS users in the following deployments: | ||||
| |:-------------|:-----------| | ||||
| | `darwin-x64` | 2024-04-10 | | ||||
| | `win10-x64`  | 2024-04-10 | | ||||
| | `linux-x64`  | 2024-04-25 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -351,7 +352,7 @@ should be run in the same Terminal session. | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.numbers`} | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| ### Stata Test | ||||
| @ -452,6 +453,60 @@ browse Name Index | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| :::info pass | ||||
| 
 | ||||
| In the terminal version of Stata, `browse` does not work: | ||||
| 
 | ||||
| ``` | ||||
| . browse Name Index | ||||
| command browse is unrecognized | ||||
| r(199); | ||||
| ``` | ||||
| 
 | ||||
| The `codebook` command will display details. | ||||
| 
 | ||||
| <details> | ||||
|   <summary><b>Expected Output</b> (click to show)</summary> | ||||
| 
 | ||||
| ``` | ||||
| ------------------------------------------------------------------------------- | ||||
| Name                                                                       Name | ||||
| ------------------------------------------------------------------------------- | ||||
| 
 | ||||
|                   Type: String (str12) | ||||
| 
 | ||||
|          Unique values: 5                         Missing "": 0/5 | ||||
| 
 | ||||
|             Tabulation: Freq.  Value | ||||
|                             1  "Barack Obama" | ||||
|                             1  "Bill Clinton" | ||||
|                             1  "Donald Trump" | ||||
|                             1  "GeorgeW Bush" | ||||
|                             1  "Joseph Biden" | ||||
| 
 | ||||
|                Warning: Variable has embedded blanks. | ||||
| 
 | ||||
| ------------------------------------------------------------------------------- | ||||
| Index                                                                     Index | ||||
| ------------------------------------------------------------------------------- | ||||
| 
 | ||||
|                   Type: Numeric (byte) | ||||
| 
 | ||||
|                  Range: [42,46]                       Units: 1 | ||||
|          Unique values: 5                         Missing .: 0/5 | ||||
| 
 | ||||
|             Tabulation: Freq.  Value | ||||
|                             1  42 | ||||
|                             1  43 | ||||
|                             1  44 | ||||
|                             1  45 | ||||
|                             1  46 | ||||
| ``` | ||||
| 
 | ||||
| </details> | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| [^1]: Run `help import excel` in Stata or see ["import excel"](https://www.stata.com/manuals/dimportexcel.pdf) in the Stata documentation. | ||||
| [^2]: See [`read` in "Reading Files"](/docs/api/parse-options) | ||||
| [^3]: See [`write` in "Writing Files"](/docs/api/write-options) | ||||
|  | ||||
| @ -166,7 +166,7 @@ This demo was tested in macOS.  The path names will differ in other platforms. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| This demo uses the [`pres.numbers` test file](https://sheetjs.com/pres.numbers). | ||||
| This demo processes [`pres.numbers`](https://docs.sheetjs.com/pres.numbers). | ||||
| There are 3 parts to the demo: | ||||
| 
 | ||||
| A) "Import": SheetJS tooling will read the test file and generate a clean XLSX | ||||
| @ -209,11 +209,11 @@ mkdir -p ~/Documents/MATLAB/ | ||||
| mv xlsx-cli ~/Documents/MATLAB/ | ||||
| ``` | ||||
| 
 | ||||
| 3) Download https://sheetjs.com/pres.numbers and save to Downloads folder: | ||||
| 3) Download https://docs.sheetjs.com/pres.numbers and save to Downloads folder: | ||||
| 
 | ||||
| ```bash | ||||
| cd ~/Downloads/ | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| ``` | ||||
| 
 | ||||
| 4) Save the following to `SheetJSMATLAB.m` in the workspace folder: | ||||
|  | ||||
| @ -30,7 +30,7 @@ flowchart LR | ||||
| 
 | ||||
| :::note Tested Deployments | ||||
| 
 | ||||
| This demo was last tested by SheetJS users on 2024 March 31 in Maple 2024. | ||||
| This demo was last tested by SheetJS users on 2024-04-25 in Maple 2024. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -160,7 +160,7 @@ mv duktape-2.7.0/src/*.{c,h} . | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.numbers`} | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 6) Still within WSL, download the extension C code | ||||
|  | ||||
| @ -155,7 +155,7 @@ This demo was tested in the following deployments: | ||||
| | `16.20.2`    | 2024-02-23 | End-of-Life             | | ||||
| | `18.19.1`    | 2024-02-23 | Maintenance LTS         | | ||||
| | `20.11.1`    | 2024-02-23 | Active LTS              | | ||||
| | `21.6.2`     | 2024-02-23 | Current                 | | ||||
| | `22.0.0`     | 2024-04-25 | Current                 | | ||||
| 
 | ||||
| While streaming methods work in End-of-Life versions of NodeJS, production | ||||
| deployments should upgrade to a Current or LTS version of NodeJS. | ||||
| @ -174,10 +174,10 @@ npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} | ||||
| curl -LO https://docs.sheetjs.com/stream/SheetJSNodeJStream.js | ||||
| ``` | ||||
| 
 | ||||
| 3) Download [the test file](https://sheetjs.com/pres.xlsx): | ||||
| 3) Download [the test file](https://docs.sheetjs.com/pres.xlsx): | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/pres.xlsx | ||||
| curl -LO https://docs.sheetjs.com/pres.xlsx | ||||
| ``` | ||||
| 
 | ||||
| 4) Run the script: | ||||
| @ -453,12 +453,12 @@ stream.to_csv(wb.Sheets[wb.SheetNames[0]]).resume();`} | ||||
| 
 | ||||
| :::note Tested Deployments | ||||
| 
 | ||||
| This demo was last tested on 2024-02-23 against Deno `1.41.0`. | ||||
| This demo was last tested on 2024-04-25 against Deno `1.42.4`. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| [`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://docs.sheetjs.com/pres.numbers and prints | ||||
| CSV row objects. | ||||
| 
 | ||||
| 1) Run the script: | ||||
| @ -467,5 +467,5 @@ CSV row objects. | ||||
| deno run -A https://docs.sheetjs.com/stream/SheetJSDenoStream.ts | ||||
| ``` | ||||
| 
 | ||||
| This script will fetch [`pres.numbers`](https://sheetjs.com/pres.numbers) and | ||||
| This script will fetch [`pres.numbers`](https://docs.sheetjs.com/pres.numbers) and | ||||
| generate CSV rows. The result will be printed to the terminal window. | ||||
| @ -193,7 +193,7 @@ Each browser demo was tested in the following environments: | ||||
| 
 | ||||
| | Browser     | Date       | Comments                                | | ||||
| |:------------|:-----------|:----------------------------------------| | ||||
| | Chrome 122  | 2024-03-12 |                                         | | ||||
| | Chrome 122  | 2024-04-25 |                                         | | ||||
| | Edge 122    | 2024-03-12 |                                         | | ||||
| | Safari 17.3 | 2024-03-12 | File System Access API is not supported | | ||||
| | Brave 1.59  | 2024-03-12 | File System Access API is not supported | | ||||
| @ -239,7 +239,7 @@ sequenceDiagram | ||||
| 
 | ||||
| In the following example, the script: | ||||
| 
 | ||||
| - downloads https://sheetjs.com/pres.numbers in a Web Worker | ||||
| - downloads https://docs.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 | ||||
| @ -260,7 +260,7 @@ importScripts("https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.mi | ||||
| self.addEventListener('message', async(e) => { | ||||
|   try { | ||||
|     /* Fetch file */ | ||||
|     const res = await fetch("https://sheetjs.com/pres.numbers"); | ||||
|     const res = await fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
|     const ab = await res.arrayBuffer(); | ||||
| \n\ | ||||
|     /* Parse file */ | ||||
|  | ||||
| @ -190,7 +190,7 @@ three files to the project directory: | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <Tabs groupId="os"> | ||||
| @ -211,7 +211,7 @@ If the `curl` command fails, run the commands within WSL `bash`. | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.numbers`} | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 3) Download [`sheetjs.duk.c`](pathname:///duk/sheetjs.duk.c): | ||||
| @ -469,13 +469,13 @@ three files to the project directory: | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.numbers`} | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 6) Download [`SheetJSDuk.php`](pathname:///duk/SheetJSDuk.php): | ||||
| @ -576,13 +576,13 @@ three files to the project directory: | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.numbers`} | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 4) Download [`SheetJSDuk.py`](pathname:///duk/SheetJSDuk.py): | ||||
| @ -649,7 +649,7 @@ The main Duktape code can be added to the Zig build pipeline. | ||||
| 
 | ||||
| :::note pass | ||||
| 
 | ||||
| The following explanation was verified against Zig 0.11.0. | ||||
| The following explanation was verified against Zig 0.12.0. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -667,7 +667,7 @@ folder must be added to the include path list: | ||||
| ``` | ||||
| 
 | ||||
| The `duktape.c` source file must be added to the build sequence. For Zig version | ||||
| 0.11.0, Duktape must be compiled with flags `-std=c99 -fno-sanitize=undefined` | ||||
| 0.12.0, Duktape must be compiled with flags `-std=c99 -fno-sanitize=undefined` | ||||
| and linked against `libc` and `libm`: | ||||
| 
 | ||||
| ```zig title="build.zig" | ||||
| @ -743,7 +743,7 @@ This demo was tested in the following deployments: | ||||
| |:-------------|:--------|:---------|:-----------| | ||||
| | `darwin-x64` | `2.7.0` | `0.11.0` | 2024-03-10 | | ||||
| | `win10-x64`  | `2.7.0` | `0.11.0` | 2024-03-10 | | ||||
| | `linux-x64`  | `2.7.0` | `0.11.0` | 2024-03-10 | | ||||
| | `linux-x64`  | `2.7.0` | `0.12.0` | 2024-04-25 | | ||||
| 
 | ||||
| On Windows, due to incompatibilities between WSL and PowerShell, some commands | ||||
| must be run in WSL Bash. | ||||
| @ -757,24 +757,24 @@ 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.12.0 from https://ziglang.org/download/ and extract to the | ||||
| project folder. | ||||
| 
 | ||||
| <Tabs groupId="triple"> | ||||
|   <TabItem value="darwin-x64" label="MacOS"> | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://ziglang.org/download/0.11.0/zig-macos-x86_64-0.11.0.tar.xz | ||||
| tar -xzf zig-macos-x86_64-0.11.0.tar.xz | ||||
| curl -LO https://ziglang.org/download/0.12.0/zig-macos-x86_64-0.12.0.tar.xz | ||||
| tar -xzf zig-macos-x86_64-0.12.0.tar.xz | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
|   <TabItem value="linux-x64" label="Linux"> | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://ziglang.org/download/0.11.0/zig-linux-x86_64-0.11.0.tar.xz | ||||
| xz -d zig-linux-x86_64-0.11.0.tar.xz | ||||
| tar -xf zig-linux-x86_64-0.11.0.tar | ||||
| curl -LO https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz | ||||
| xz -d zig-linux-x86_64-0.12.0.tar.xz | ||||
| tar -xf zig-linux-x86_64-0.12.0.tar | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
| @ -787,8 +787,8 @@ The following commands should be run within WSL bash. | ||||
| ::: | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://ziglang.org/download/0.11.0/zig-windows-x86_64-0.11.0.zip | ||||
| unzip zig-windows-x86_64-0.11.0.zip | ||||
| curl -LO https://ziglang.org/download/0.12.0/zig-windows-x86_64-0.12.0.zip | ||||
| unzip zig-windows-x86_64-0.12.0.zip | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
| @ -800,14 +800,14 @@ unzip zig-windows-x86_64-0.11.0.zip | ||||
|   <TabItem value="darwin-x64" label="MacOS"> | ||||
| 
 | ||||
| ```bash | ||||
| ./zig-macos-x86_64-0.11.0/zig init-exe | ||||
| ./zig-macos-x86_64-0.12.0/zig init | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
|   <TabItem value="linux-x64" label="Linux"> | ||||
| 
 | ||||
| ```bash | ||||
| ./zig-linux-x86_64-0.11.0/zig init-exe | ||||
| ./zig-linux-x86_64-0.12.0/zig init | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
| @ -820,7 +820,7 @@ The following command should be run within Powershell. | ||||
| ::: | ||||
| 
 | ||||
| ```bash | ||||
| .\zig-windows-x86_64-0.11.0\zig.exe init-exe | ||||
| .\zig-windows-x86_64-0.12.0\zig.exe init | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
| @ -841,7 +841,7 @@ three files to the `src` subdirectory: | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| The following commands can be run within a shell on macOS and Linux. On Windows, | ||||
| @ -850,7 +850,7 @@ the commands should be run within WSL bash: | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers | ||||
| mv *.js src`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| @ -859,8 +859,6 @@ mv *.js src`} | ||||
| ```zig title="build.zig (add highlighted lines)" | ||||
|     const exe = b.addExecutable(.{ | ||||
|         .name = "sheetjs-zig", | ||||
|         // In this case the main source file is merely a path, however, in more | ||||
|         // complicated build scripts, this could be a generated file. | ||||
|         .root_source_file = .{ .path = "src/main.zig" }, | ||||
|         .target = target, | ||||
|         .optimize = optimize, | ||||
| @ -886,14 +884,14 @@ curl -L -o src/main.zig https://docs.sheetjs.com/duk/main.zig | ||||
|   <TabItem value="darwin-x64" label="MacOS"> | ||||
| 
 | ||||
| ```bash | ||||
| ./zig-macos-x86_64-0.11.0/zig build run -- pres.numbers | ||||
| ./zig-macos-x86_64-0.12.0/zig build run -- pres.numbers | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
|   <TabItem value="linux-x64" label="Linux"> | ||||
| 
 | ||||
| ```bash | ||||
| ./zig-linux-x86_64-0.11.0/zig build run -- pres.numbers | ||||
| ./zig-linux-x86_64-0.12.0/zig build run -- pres.numbers | ||||
| ``` | ||||
| 
 | ||||
| :::caution pass | ||||
| @ -916,7 +914,7 @@ sudo pacman -Syu glibc linux-api-headers | ||||
|   <TabItem value="win10-x64" label="Windows"> | ||||
| 
 | ||||
| ```bash | ||||
| .\zig-windows-x86_64-0.11.0\zig.exe build run -- pres.numbers | ||||
| .\zig-windows-x86_64-0.12.0\zig.exe build run -- pres.numbers | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
| @ -978,7 +976,7 @@ curl -LO https://docs.sheetjs.com/duk/SheetJSDuk.pl | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.extendscript.js | ||||
| curl -LO https://sheetjs.com/pres.xlsx`} | ||||
| curl -LO https://docs.sheetjs.com/pres.xlsx`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 4) Run the script: | ||||
|  | ||||
| @ -756,12 +756,12 @@ the project directory: | ||||
| 
 | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.numbers`} | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 13) Download [`sheetjs.v8.cc`](pathname:///v8/sheetjs.v8.cc): | ||||
| @ -866,7 +866,7 @@ This demo was last tested in the following deployments: | ||||
| | `darwin-x64` | `0.89.0` | 2024-04-04 | | ||||
| | `darwin-arm` | `0.82.0` | 2023-12-01 | | ||||
| | `win10-x64`  | `0.89.0` | 2024-03-24 | | ||||
| | `linux-x64`  | `0.89.0` | 2024-03-21 | | ||||
| | `linux-x64`  | `0.91.0` | 2024-04-25 | | ||||
| | `linux-arm`  | `0.82.0` | 2023-12-01 | | ||||
| 
 | ||||
| ::: | ||||
| @ -886,14 +886,17 @@ cargo add v8 | ||||
| cargo run | ||||
| ``` | ||||
| 
 | ||||
| 3) Download the SheetJS Standalone script and move to the project directory: | ||||
| 3) Download the SheetJS Standalone script and test file. Save both files in the | ||||
| project directory: | ||||
| 
 | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`} | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 4) Download [`main.rs`](pathname:///v8/main.rs) and replace `src/main.rs`: | ||||
| @ -902,10 +905,9 @@ curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`} | ||||
| curl -L -o src/main.rs https://docs.sheetjs.com/v8/main.rs | ||||
| ``` | ||||
| 
 | ||||
| 5) Download [the test file](https://sheetjs.com/pres.numbers) and run: | ||||
| 5) Build and run the app: | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/pres.numbers | ||||
| cargo run pres.numbers | ||||
| ``` | ||||
| 
 | ||||
|  | ||||
| @ -30,9 +30,9 @@ This demo was tested in the following deployments: | ||||
| | OpenJDK | Rhino    | Date       | | ||||
| |:--------|:---------|:-----------| | ||||
| | 22      | `1.7.14` | 2024-04-04 | | ||||
| | 21.0.1  | `1.7.14` | 2023-12-05 | | ||||
| | 21.0.2  | `1.7.14` | 2024-04-25 | | ||||
| | 17.0.10 | `1.7.14` | 2024-03-25 | | ||||
| | 1.8.0   | `1.7.14` | 2023-12-05 | | ||||
| | 1.8.0   | `1.7.14` | 2024-04-25 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -152,12 +152,12 @@ the project directory: | ||||
| 
 | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.xlsx">pres.xlsx</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.xlsx">pres.xlsx</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.xlsx`} | ||||
| curl -LO https://docs.sheetjs.com/pres.xlsx`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 4) Download [`SheetJSRhino.zip`](pathname:///rhino/SheetJSRhino.zip) and unzip | ||||
|  | ||||
| @ -344,12 +344,12 @@ the project directory: | ||||
| 
 | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.numbers`} | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 3) Download the Swift scripts for the demo | ||||
| @ -511,12 +511,12 @@ the project directory: | ||||
| 
 | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.numbers`} | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 8) Run the program: | ||||
|  | ||||
| @ -41,7 +41,7 @@ setting the environment variable on supported platforms. | ||||
| :::note pass | ||||
| 
 | ||||
| Most of the integration functions are not documented. This explanation is based | ||||
| on version `3.0.1`. | ||||
| on version `3.1.0`. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -167,7 +167,7 @@ This demo was tested in the following deployments: | ||||
| | `darwin-arm` | `3.0.0-beta-2056` | 2023-12-01 | | ||||
| | `win10-x64`  | `3.1.0`           | 2024-04-17 | | ||||
| | `win11-arm`  | `3.0.0-beta-2056` | 2023-12-01 | | ||||
| | `linux-x64`  | `3.0.1`           | 2024-03-21 | | ||||
| | `linux-x64`  | `3.1.0`           | 2024-04-25 | | ||||
| | `linux-arm`  | `3.0.0-beta-2056` | 2023-12-01 | | ||||
| 
 | ||||
| ::: | ||||
| @ -248,7 +248,7 @@ dotnet run | ||||
| 
 | ||||
| ```bash | ||||
| dotnet nuget add source https://www.myget.org/F/jint/api/v3/index.json | ||||
| dotnet add package Jint --version 3.0.1 | ||||
| dotnet add package Jint --version 3.1.0 | ||||
| ``` | ||||
| 
 | ||||
| To verify Jint is installed, replace `Program.cs` with the following: | ||||
| @ -274,13 +274,13 @@ three files to the project directory: | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.xlsx">pres.xlsx</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.xlsx">pres.xlsx</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.xlsx`} | ||||
| curl -LO https://docs.sheetjs.com/pres.xlsx`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 6) Replace `Program.cs` with the following: | ||||
|  | ||||
| @ -94,7 +94,7 @@ This demo was tested in the following deployments: | ||||
| 
 | ||||
| | Architecture | Git Commit | Go version | Date       | | ||||
| |:-------------|:-----------|:-----------|:-----------| | ||||
| | `darwin-x64` | `e401ed4`  | `1.22.1`   | 2024-03-15 | | ||||
| | `darwin-x64` | `e401ed4`  | `1.21.7`   | 2024-04-25 | | ||||
| | `darwin-arm` | `873a149`  | `1.21.3`   | 2023-10-18 | | ||||
| | `win10-x64`  | `e401ed4`  | `1.22.1`   | 2024-03-24 | | ||||
| | `win11-arm`  | `b396bb4`  | `1.21.1`   | 2023-12-01 | | ||||
| @ -121,13 +121,13 @@ three files to the project directory: | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.numbers`} | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 2) Download [`SheetGoja.go`](pathname:///goja/SheetGoja.go): | ||||
|  | ||||
| @ -153,13 +153,13 @@ three files to the project directory: | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.xlsx">pres.xlsx</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.xlsx">pres.xlsx</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js | ||||
| curl -LO https://sheetjs.com/pres.xlsx`} | ||||
| curl -LO https://docs.sheetjs.com/pres.xlsx`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 2) Download [`SheetJSNashorn.java`](pathname:///nashorn/SheetJSNashorn.java): | ||||
|  | ||||
| @ -267,10 +267,10 @@ This demo was tested in the following deployments: | ||||
| | `darwin-arm` | `2788d71`  | 2023-10-18 | | ||||
| | `win10-x64`  | `9e561d5`  | 2024-03-04 | | ||||
| | `win11-arm`  | `03cc5ec`  | 2023-12-01 | | ||||
| | `linux-x64`  | `6a89d7c`  | 2024-03-21 | | ||||
| | `linux-x64`  | `3b45d15`  | 2024-04-25 | | ||||
| | `linux-arm`  | `03cc5ec`  | 2023-12-01 | | ||||
| 
 | ||||
| When the demo was tested, commit `9e561d5` corresponded to the latest release. | ||||
| When the demo was tested, `3b45d15` was the HEAD commit on the `master` branch. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -286,7 +286,7 @@ tests were run entirely within Windows Subsystem for Linux. | ||||
| ```bash | ||||
| git clone https://github.com/bellard/quickjs | ||||
| cd quickjs | ||||
| git checkout 6a89d7c | ||||
| git checkout 3b45d15 | ||||
| make | ||||
| cd .. | ||||
| ``` | ||||
| @ -317,12 +317,12 @@ the project directory: | ||||
| 
 | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.numbers`} | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 5) Run the test program: | ||||
| @ -343,9 +343,9 @@ This demo was tested in the following environments: | ||||
| 
 | ||||
| | Git Commit | Date       | | ||||
| |:-----------|:-----------| | ||||
| | `6a89d7c`  | 2024-03-21 | | ||||
| | `3b45d15`  | 2024-04-25 | | ||||
| 
 | ||||
| When the demo was tested, commit `6a89d7c` corresponded to the latest release. | ||||
| When the demo was tested, `3b45d15` was the HEAD commit on the `master` branch. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -365,12 +365,12 @@ the project directory: | ||||
| 
 | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.numbers`} | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 2) Download [`SheetJSQuick.js`](pathname:///quickjs/SheetJSQuick.js) | ||||
|  | ||||
| @ -364,7 +364,7 @@ This demo was tested in the following deployments: | ||||
| 
 | ||||
| | Architecture | Git Commit | Date       | | ||||
| |:-------------|:-----------|:-----------| | ||||
| | `darwin-x64` | `15b323d`  | 2024-03-15 | | ||||
| | `darwin-x64` | `d070c74`  | 2024-04-25 | | ||||
| | `darwin-arm` | `2b4f949`  | 2023-10-18 | | ||||
| | `linux-x64`  | `d217af8`  | 2024-03-21 | | ||||
| | `linux-arm`  | `84732b3`  | 2023-12-01 | | ||||
| @ -501,12 +501,12 @@ the project directory: | ||||
| 
 | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.numbers`} | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 7) Copy the `libhermes` and `libjsi` libraries into the current folder: | ||||
| @ -697,12 +697,12 @@ the project directory: | ||||
| 
 | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -o xlsx.full.min.js https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -o pres.numbers https://sheetjs.com/pres.numbers`} | ||||
| curl -o pres.numbers https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 10) Run the application: | ||||
| @ -774,12 +774,12 @@ the project directory: | ||||
| 
 | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.numbers`} | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 5) Bundle the test file and create `payload.js`: | ||||
|  | ||||
| @ -70,7 +70,7 @@ This demo was tested in the following deployments: | ||||
| 
 | ||||
| | Platform     | Ruby     | ExecJS  | Date       | | ||||
| |:-------------|:---------|:--------|:-----------| | ||||
| | `darwin-x64` | `2.6.10` | `2.9.1` | 2024-03-15 | | ||||
| | `darwin-x64` | `2.6.10` | `2.9.1` | 2024-04-25 | | ||||
| | `darwin-arm` | `2.6.10` | `2.9.1` | 2023-12-01 | | ||||
| | `win10-x64`  | `3.2.3`  | `2.9.1` | 2024-03-10 | | ||||
| | `win11-arm`  | `3.0.2`  | `2.9.1` | 2023-12-01 | | ||||
| @ -87,7 +87,8 @@ This demo was tested in the following deployments: | ||||
| gem install execjs | ||||
| ``` | ||||
| 
 | ||||
| :::note pass | ||||
| <details> | ||||
|   <summary><b>Installation Notes</b> (click to show)</summary> | ||||
| 
 | ||||
| The command may need to be run as an administrator or root user: | ||||
| 
 | ||||
| @ -95,8 +96,6 @@ The command may need to be run as an administrator or root user: | ||||
| sudo gem install execjs | ||||
| ``` | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| :::note pass | ||||
| 
 | ||||
| On Arch Linux-based platforms including the Steam Deck, `rubygems` must be | ||||
| @ -108,6 +107,8 @@ sudo pacman -Syu rubygems | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| </details> | ||||
| 
 | ||||
| 1) Create a new project folder: | ||||
| 
 | ||||
| ```bash | ||||
| @ -120,12 +121,12 @@ the project directory: | ||||
| 
 | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.numbers`} | ||||
| curl -LO https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 3) Download [`ExecSheetJS.rb`](pathname:///execjs/ExecSheetJS.rb): | ||||
|  | ||||
| @ -135,7 +135,7 @@ This demo was tested in the following deployments: | ||||
| | `darwin-x64` | `c3ead3f`  | 2024-03-15 | | ||||
| | `darwin-arm` | `c3ead3f`  | 2023-10-19 | | ||||
| | `win10-x64`  | `c3ead3f`  | 2024-03-04 | | ||||
| | `linux-x64`  | `c3ead3f`  | 2024-03-21 | | ||||
| | `linux-x64`  | `1f6e17c`  | 2024-04-25 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -180,7 +180,7 @@ All commands in this demo should be run in a "Native Tools Command Prompt". | ||||
| ```bash | ||||
| git clone https://github.com/chakra-core/ChakraCore.git | ||||
| cd ChakraCore | ||||
| git checkout c3ead3f | ||||
| git checkout 1f6e17c | ||||
| cd .. | ||||
| ``` | ||||
| 
 | ||||
| @ -376,13 +376,13 @@ three files to the project directory: | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -L -O https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -L -O https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js | ||||
| curl -L -O https://sheetjs.com/pres.numbers`} | ||||
| curl -L -O https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 6) Run the test program: | ||||
| @ -411,7 +411,7 @@ If successful, the program will print the contents of the first sheet as CSV. | ||||
| 
 | ||||
| :::note Tested Deployments | ||||
| 
 | ||||
| This demo was last tested on 2024-03-21 against `ch` commit `c3ead3f`. | ||||
| This demo was last tested on 2024-04-25 against `ch` commit `1f6e17c`. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -435,13 +435,13 @@ three files to the project directory: | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.numbers">pres.numbers</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -L -O https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -L -O https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js | ||||
| curl -L -O https://sheetjs.com/pres.numbers`} | ||||
| curl -L -O https://docs.sheetjs.com/pres.numbers`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 2) Bundle the test file and create `payload.js`: | ||||
|  | ||||
| @ -120,9 +120,9 @@ This demo was tested in the following deployments: | ||||
| 
 | ||||
| | Architecture | Boa      | Date       | | ||||
| |:-------------|:---------|:-----------| | ||||
| | `darwin-x64` | `0.18.0` | 2024-03-15 | | ||||
| | `darwin-x64` | `0.18.0` | 2024-04-25 | | ||||
| | `darwin-arm` | `0.17.3` | 2023-10-20 | | ||||
| | `win10-x64`  | `0.17.3` | 2024-03-04 | | ||||
| | `win10-x64`  | `0.18.0` | 2024-04-25 | | ||||
| | `win11-arm`  | `0.17.3` | 2023-12-01 | | ||||
| | `linux-x64`  | `0.18.0` | 2024-03-21 | | ||||
| | `linux-arm`  | `0.17.3` | 2023-12-01 | | ||||
| @ -143,14 +143,17 @@ cargo run | ||||
| cargo add boa_engine | ||||
| ``` | ||||
| 
 | ||||
| 3) Download the SheetJS Standalone script and move to the project directory: | ||||
| 3) Download the SheetJS Standalone script and test file. Save both files in the | ||||
| project directory: | ||||
| 
 | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.xlsx">pres.xlsx</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`} | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://docs.sheetjs.com/pres.xlsx`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 4) Download [`main.rs`](pathname:///boa/main.rs) and replace `src/main.rs`: | ||||
| @ -159,10 +162,9 @@ curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`} | ||||
| curl -L -o src/main.rs https://docs.sheetjs.com/boa/main.rs | ||||
| ``` | ||||
| 
 | ||||
| 5) Download [the test file](https://sheetjs.com/pres.xlsx) and run: | ||||
| 5) Build and run the app in release mode: | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/pres.xlsx | ||||
| cargo run --release | ||||
| ``` | ||||
| 
 | ||||
|  | ||||
| @ -127,7 +127,7 @@ curl -LO https://docs.sheetjs.com/perl/SheetJE.pl | ||||
| 4) Download a test file and run: | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO https://sheetjs.com/data/cd.xls | ||||
| curl -LO https://docs.sheetjs.com/cd.xls | ||||
| perl SheetJE.pl cd.xls | ||||
| ``` | ||||
| 
 | ||||
|  | ||||
| @ -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://docs.sheetjs.com/pres.xlsx | ||||
| - 65536 (64M) for https://docs.sheetjs.com/pres.numbers | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -36,7 +36,7 @@ This demo was tested in the following environments: | ||||
| 
 | ||||
| | Architecture | Commit    | Date       | | ||||
| |:-------------|:----------|:-----------| | ||||
| | `darwin-x64` | `cefd391` | 2024-03-15 | | ||||
| | `darwin-x64` | `47bd5d4` | 2024-04-25 | | ||||
| | `darwin-arm` | `ef4cb2b` | 2023-12-08 | | ||||
| | `win10-x64`  | `47bd5d4` | 2024-04-14 | | ||||
| | `win11-arm`  | `ef4cb2b` | 2023-12-08 | | ||||
| @ -372,13 +372,13 @@ three files to the `SheetJSJerry` directory: | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.xlsx">pres.xlsx</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.xlsx">pres.xlsx</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.xlsx`} | ||||
| curl -LO https://docs.sheetjs.com/pres.xlsx`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 4) Download [`sheetjs.jerry.c`](pathname:///jerryscript/sheetjs.jerry.c) into | ||||
| @ -438,13 +438,13 @@ three files to the `jerryscript` cloned repo directory: | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.xlsx">pres.xlsx</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.xlsx">pres.xlsx</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.xlsx`} | ||||
| curl -LO https://docs.sheetjs.com/pres.xlsx`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 2) Bundle the test file and create `payload.js`: | ||||
|  | ||||
| @ -56,7 +56,7 @@ This demo was tested in the following deployments: | ||||
| |:--------|:--------|:-----------| | ||||
| | 22      | 24.0.0  | 2024-03-23 | | ||||
| | 21.0.2  | 24.0.0  | 2024-03-23 | | ||||
| | 17.0.10 | 24.0.0  | 2024-03-25 | | ||||
| | 17.0.7  | 24.0.1  | 2024-04-25 | | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -65,14 +65,14 @@ This demo was tested in the following deployments: | ||||
| 0) Download GraalJS and its dependencies: | ||||
| 
 | ||||
| ```bash | ||||
| curl -LO "https://repo1.maven.org/maven2/org/graalvm/js/js-scriptengine/24.0.0/js-scriptengine-24.0.0.jar" | ||||
| curl -LO "https://repo1.maven.org/maven2/org/graalvm/js/js-language/24.0.0/js-language-24.0.0.jar" | ||||
| curl -LO "https://repo1.maven.org/maven2/org/graalvm/polyglot/polyglot/24.0.0/polyglot-24.0.0.jar" | ||||
| curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/collections/24.0.0/collections-24.0.0.jar" | ||||
| curl -LO "https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/24.0.0/truffle-api-24.0.0.jar" | ||||
| curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/nativeimage/24.0.0/nativeimage-24.0.0.jar" | ||||
| curl -LO "https://repo1.maven.org/maven2/org/graalvm/shadowed/icu4j/24.0.0/icu4j-24.0.0.jar" | ||||
| curl -LO "https://repo1.maven.org/maven2/org/graalvm/regex/regex/24.0.0/regex-24.0.0.jar" | ||||
| curl -LO "https://repo1.maven.org/maven2/org/graalvm/js/js-scriptengine/24.0.1/js-scriptengine-24.0.1.jar" | ||||
| curl -LO "https://repo1.maven.org/maven2/org/graalvm/js/js-language/24.0.1/js-language-24.0.1.jar" | ||||
| curl -LO "https://repo1.maven.org/maven2/org/graalvm/polyglot/polyglot/24.0.1/polyglot-24.0.1.jar" | ||||
| curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/collections/24.0.1/collections-24.0.1.jar" | ||||
| curl -LO "https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/24.0.1/truffle-api-24.0.1.jar" | ||||
| curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/nativeimage/24.0.1/nativeimage-24.0.1.jar" | ||||
| curl -LO "https://repo1.maven.org/maven2/org/graalvm/shadowed/icu4j/24.0.1/icu4j-24.0.1.jar" | ||||
| curl -LO "https://repo1.maven.org/maven2/org/graalvm/regex/regex/24.0.1/regex-24.0.1.jar" | ||||
| ``` | ||||
| 
 | ||||
| 1) Download the SheetJS Standalone script, shim script and test file. Move all | ||||
| @ -81,13 +81,13 @@ three files to the project directory: | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.xlsx">pres.xlsx</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.xlsx">pres.xlsx</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js | ||||
| curl -LO https://sheetjs.com/pres.xlsx`} | ||||
| curl -LO https://docs.sheetjs.com/pres.xlsx`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 2) Download [`SheetJSNashorn.java`](pathname:///nashorn/SheetJSNashorn.java): | ||||
| @ -113,14 +113,14 @@ CSV rows from the first worksheet. | ||||
|   <TabItem value="unix" label="Linux/MacOS"> | ||||
| 
 | ||||
| ```bash | ||||
| java -cp ".:js-scriptengine-24.0.0.jar:js-language-24.0.0.jar:polyglot-24.0.0.jar:collections-24.0.0.jar:truffle-api-24.0.0.jar:nativeimage-24.0.0.jar:icu4j-24.0.0.jar:regex-24.0.0.jar" -Dpolyglot.js.nashorn-compat=true SheetJSNashorn pres.xlsx | ||||
| java -cp ".:js-scriptengine-24.0.1.jar:js-language-24.0.1.jar:polyglot-24.0.1.jar:collections-24.0.1.jar:truffle-api-24.0.1.jar:nativeimage-24.0.1.jar:icu4j-24.0.1.jar:regex-24.0.1.jar" -Dpolyglot.js.nashorn-compat=true SheetJSNashorn pres.xlsx | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
|   <TabItem value="win" label="Windows"> | ||||
| 
 | ||||
| ```bash | ||||
| java -cp ".;js-scriptengine-24.0.0.jar;js-language-24.0.0.jar;polyglot-24.0.0.jar;collections-24.0.0.jar;truffle-api-24.0.0.jar;nativeimage-24.0.0.jar;icu4j-24.0.0.jar;regex-24.0.0.jar" -D"polyglot.js.nashorn-compat=true" SheetJSNashorn pres.xlsx | ||||
| java -cp ".;js-scriptengine-24.0.1.jar;js-language-24.0.1.jar;polyglot-24.0.1.jar;collections-24.0.1.jar;truffle-api-24.0.1.jar;nativeimage-24.0.1.jar;icu4j-24.0.1.jar;regex-24.0.1.jar" -D"polyglot.js.nashorn-compat=true" SheetJSNashorn pres.xlsx | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
| @ -150,14 +150,14 @@ cd sheethorn | ||||
|   <TabItem value="unix" label="Linux/MacOS"> | ||||
| 
 | ||||
| ```bash | ||||
| java -cp ".:js-scriptengine-24.0.0.jar:js-language-24.0.0.jar:polyglot-24.0.0.jar:collections-24.0.0.jar:truffle-api-24.0.0.jar:nativeimage-24.0.0.jar:icu4j-24.0.0.jar:regex-24.0.0.jar:SheetJSNashorn.jar" -Dpolyglot.js.nashorn-compat=true  SheetJSNashorn pres.xlsx | ||||
| java -cp ".:js-scriptengine-24.0.1.jar:js-language-24.0.1.jar:polyglot-24.0.1.jar:collections-24.0.1.jar:truffle-api-24.0.1.jar:nativeimage-24.0.1.jar:icu4j-24.0.1.jar:regex-24.0.1.jar:SheetJSNashorn.jar" -Dpolyglot.js.nashorn-compat=true  SheetJSNashorn pres.xlsx | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
|   <TabItem value="win" label="Windows"> | ||||
| 
 | ||||
| ```bash | ||||
| java -cp ".;js-scriptengine-24.0.0.jar;js-language-24.0.0.jar;polyglot-24.0.0.jar;collections-24.0.0.jar;truffle-api-24.0.0.jar;nativeimage-24.0.0.jar;icu4j-24.0.0.jar;regex-24.0.0.jar;SheetJSNashorn.jar" -D"polyglot.js.nashorn-compat=true"  SheetJSNashorn pres.xlsx | ||||
| java -cp ".;js-scriptengine-24.0.1.jar;js-language-24.0.1.jar;polyglot-24.0.1.jar;collections-24.0.1.jar;truffle-api-24.0.1.jar;nativeimage-24.0.1.jar;icu4j-24.0.1.jar;regex-24.0.1.jar;SheetJSNashorn.jar" -D"polyglot.js.nashorn-compat=true"  SheetJSNashorn pres.xlsx | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
|  | ||||
| @ -368,13 +368,13 @@ three files to the project directory: | ||||
| <ul> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>shim.min.js</a></li> | ||||
| <li><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>xlsx.full.min.js</a></li> | ||||
| <li><a href="https://sheetjs.com/pres.xlsb">pres.xlsb</a></li> | ||||
| <li><a href="https://docs.sheetjs.com/pres.xlsb">pres.xlsb</a></li> | ||||
| </ul> | ||||
| 
 | ||||
| <CodeBlock language="bash">{`\ | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js | ||||
| curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js | ||||
| curl -LO https://sheetjs.com/pres.xlsb`} | ||||
| curl -LO https://docs.sheetjs.com/pres.xlsb`} | ||||
| </CodeBlock> | ||||
| 
 | ||||
| 7) Run the application: | ||||
|  | ||||
| @ -406,7 +406,7 @@ For modern websites targeting Chrome 42+, `fetch` is recommended: | ||||
| // XLSX is a global from the standalone script | ||||
| 
 | ||||
| (async() => { | ||||
|   const url = "https://sheetjs.com/pres.xlsx"; | ||||
|   const url = "https://docs.sheetjs.com/pres.xlsx"; | ||||
|   const data = await (await fetch(url)).arrayBuffer(); | ||||
|   /* data is an ArrayBuffer */ | ||||
|   const workbook = XLSX.read(data); | ||||
| @ -418,7 +418,7 @@ For modern websites targeting Chrome 42+, `fetch` is recommended: | ||||
| For broader support, the `XMLHttpRequest` approach is recommended: | ||||
| 
 | ||||
| ```js | ||||
| var url = "https://sheetjs.com/pres.xlsx"; | ||||
| var url = "https://docs.sheetjs.com/pres.xlsx"; | ||||
| 
 | ||||
| /* set up async GET request */ | ||||
| var req = new XMLHttpRequest(); | ||||
| @ -447,7 +447,7 @@ NodeJS releases starting from version 18.0 have native support for fetch: | ||||
| ```js | ||||
| const XLSX = require("xlsx"); | ||||
| 
 | ||||
| const url = "https://sheetjs.com/pres.xlsx"; | ||||
| const url = "https://docs.sheetjs.com/pres.xlsx"; | ||||
| const data = await (await fetch(url)).arrayBuffer(); | ||||
| /* data is an ArrayBuffer */ | ||||
| const workbook = XLSX.read(data); | ||||
| @ -461,7 +461,7 @@ For broader compatibility, third-party modules are recommended. | ||||
| var XLSX = require("xlsx"); | ||||
| var request = require("request"); | ||||
| 
 | ||||
| var url = "https://sheetjs.com/pres.xlsx"; | ||||
| var url = "https://docs.sheetjs.com/pres.xlsx"; | ||||
| request({url: url, encoding: null}, function(err, resp, body) { | ||||
|   var workbook = XLSX.read(body); | ||||
| 
 | ||||
| @ -475,7 +475,7 @@ request({url: url, encoding: null}, function(err, resp, body) { | ||||
| const XLSX = require("xlsx"); | ||||
| const axios = require("axios"); | ||||
| 
 | ||||
| const url = "https://sheetjs.com/pres.xlsx"; | ||||
| const url = "https://docs.sheetjs.com/pres.xlsx"; | ||||
| (async() => { | ||||
|   const res = await axios.get(url, {responseType: "arraybuffer"}); | ||||
|   /* res.data is a Buffer */ | ||||
| @ -496,7 +496,7 @@ import * as XLSX from 'xlsx'; | ||||
| import * as cptable from 'xlsx/dist/cpexcel.full.mjs'; | ||||
| XLSX.set_cptable(cptable); | ||||
| 
 | ||||
| const url = "https://sheetjs.com/pres.xlsx"; | ||||
| const url = "https://docs.sheetjs.com/pres.xlsx"; | ||||
| // highlight-next-line | ||||
| const data = await (await fetch(url)).arrayBuffer(); | ||||
| /* data is an ArrayBuffer */ | ||||
| @ -515,7 +515,7 @@ import * as XLSX from 'https://cdn.sheetjs.com/xlsx-${current}/package/xlsx.mjs' | ||||
| import * as cptable from 'https://cdn.sheetjs.com/xlsx-${current}/package/dist/cpexcel.full.mjs'; | ||||
| XLSX.set_cptable(cptable); | ||||
| \n\ | ||||
| const url = "https://sheetjs.com/pres.xlsx"; | ||||
| const url = "https://docs.sheetjs.com/pres.xlsx"; | ||||
| // highlight-next-line | ||||
| const data = await (await fetch(url)).arrayBuffer(); | ||||
| /* data is an ArrayBuffer */ | ||||
| @ -542,7 +542,7 @@ resources.  Responses should be manually concatenated using `Buffer.concat`: | ||||
| const XLSX = require("xlsx"); | ||||
| const { net } = require("electron"); | ||||
| 
 | ||||
| const url = "https://sheetjs.com/pres.xlsx"; | ||||
| const url = "https://docs.sheetjs.com/pres.xlsx"; | ||||
| const req = net.request(url); | ||||
| req.on("response", (res) => { | ||||
|   const bufs = []; // this array will collect all of the buffers | ||||
|  | ||||
| @ -631,7 +631,7 @@ import { read, utils } from "xlsx"; | ||||
| 
 | ||||
| import 'react-data-grid/lib/styles.css'; | ||||
| 
 | ||||
| const url = "https://sheetjs.com/pres.xlsx"; | ||||
| const url = "https://docs.sheetjs.com/pres.xlsx"; | ||||
| 
 | ||||
| export default function App() { | ||||
|   const [columns, setColumns] = useState([]); | ||||
|  | ||||
| @ -35,11 +35,11 @@ produces HTML output.  The function takes an options argument: | ||||
| | `header`    |          | Override header                                     | | ||||
| | `footer`    |          | Override footer                                     | | ||||
| 
 | ||||
| Starting from [the sample file `pres.numbers`](https://sheetjs.com/pres.numbers): | ||||
| Starting from [the sample file `pres.numbers`](https://docs.sheetjs.com/pres.numbers): | ||||
| 
 | ||||
| ```jsx live | ||||
| function SheetJSHTML() { | ||||
|   const url = "https://sheetjs.com/pres.numbers"; | ||||
|   const url = "https://docs.sheetjs.com/pres.numbers"; | ||||
|   const [__html, setHTML] = React.useState(""); | ||||
|   React.useEffect(() => { (async() => { | ||||
|     /* download file and parse */ | ||||
|  | ||||
| @ -30,7 +30,7 @@ function SheetJSPreCSView() { | ||||
|     setHTML(res); | ||||
|   }; | ||||
|   React.useEffect(() => { (async() => { | ||||
|     const url = "https://sheetjs.com/pres.numbers"; | ||||
|     const url = "https://docs.sheetjs.com/pres.numbers"; | ||||
|     process(await (await fetch(url)).arrayBuffer()); | ||||
|   })(); }, []); | ||||
| 
 | ||||
|  | ||||
| @ -248,7 +248,7 @@ support for CSS styling and rich text. | ||||
| <script> | ||||
| (async() => { | ||||
|   /* replace with the URL of the file */ | ||||
|   const URL_TO_DOWNLOAD = "https://sheetjs.com/pres.numbers"; | ||||
|   const URL_TO_DOWNLOAD = "https://docs.sheetjs.com/pres.numbers"; | ||||
|   const ab = await (await fetch(URL_TO_DOWNLOAD)).arrayBuffer(); | ||||
| 
 | ||||
|   /* Parse file and get first worksheet */ | ||||
| @ -268,7 +268,7 @@ support for CSS styling and rich text. | ||||
| <details open> | ||||
|   <summary><b>Live Example</b> (click to hide)</summary> | ||||
| 
 | ||||
| This demo processes https://sheetjs.com/pres.numbers | ||||
| This demo processes https://docs.sheetjs.com/pres.numbers | ||||
| 
 | ||||
| ```jsx live | ||||
| /* The live editor requires this function wrapper */ | ||||
| @ -278,7 +278,7 @@ function Numbers2HTML(props) { | ||||
|   /* Fetch and update HTML */ | ||||
|   React.useEffect(() => { (async() => { | ||||
|     /* Fetch file */ | ||||
|     const f = await fetch("https://sheetjs.com/pres.numbers"); | ||||
|     const f = await fetch("https://docs.sheetjs.com/pres.numbers"); | ||||
|     const ab = await f.arrayBuffer(); | ||||
| 
 | ||||
|     /* Parse file */ | ||||
|  | ||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
		Reference in New Issue
	
	Block a user