diff --git a/Makefile b/Makefile index 9dee755..2bb285a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: build build: - cp formats.png docz/docs/img/formats.png + cp formats.png docz/static/formats.png cd docz; npx -y pnpm build; cd .. rm -rf docs mv docz/build/ docs diff --git a/docz/docs/02-getting-started/01-installation/01-standalone.mdx b/docz/docs/02-getting-started/01-installation/01-standalone.mdx index 6482eb5..a0c63c4 100644 --- a/docz/docs/02-getting-started/01-installation/01-standalone.mdx +++ b/docz/docs/02-getting-started/01-installation/01-standalone.mdx @@ -106,7 +106,7 @@ importScripts("https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.mi This section refers to imports using `script type="module"`. For imports in modern projects using Webpack or React or Angular or VueJS, the installation is -described [in the next section](./frameworks). +described [in the next section](/docs/getting-started/installation/frameworks). ::: @@ -150,7 +150,7 @@ xport.addEventListener("click", async() => { </script>`} </code></pre> -Web Worker support is noted in [the demo](../../demos/worker#installation) +Web Worker support is noted in [the demo](/docs/demos/worker#installation) ## Bower diff --git a/docz/docs/02-getting-started/01-installation/02-frameworks.md b/docz/docs/02-getting-started/01-installation/02-frameworks.md index a60c2e3..0718e76 100644 --- a/docz/docs/02-getting-started/01-installation/02-frameworks.md +++ b/docz/docs/02-getting-started/01-installation/02-frameworks.md @@ -41,7 +41,7 @@ Once installed, the library can be imported under the name `xlsx`: import { read, writeFileXLSX } from "xlsx"; ``` -The ["Bundlers" demo](../../demos/bundler) includes examples for specific +The ["Bundlers" demo](/docs/demos/bundler) includes examples for specific bundler tools. :::warning diff --git a/docz/docs/02-getting-started/01-installation/04-amd.md b/docz/docs/02-getting-started/01-installation/04-amd.md index 5790def..22e5100 100644 --- a/docz/docs/02-getting-started/01-installation/04-amd.md +++ b/docz/docs/02-getting-started/01-installation/04-amd.md @@ -36,7 +36,7 @@ define(['N/file', './xlsx.full.min'], function(file, XLSX) { }) ``` -As explained in the [NetSuite demo](../../demos/netsuite), module +As explained in the [NetSuite demo](/docs/demos/netsuite), module aliases are created in config files referenced via `@NAmdConfig` comments. ## SAP UI5 @@ -95,7 +95,7 @@ require(['xlsx'], function(XLSX) { Dojo has changed module loading strategies over the years. These examples were tested with Dojo `1.10.4` and are not guaranteed to work with other versions. -Live demos are included in ["Dojo Toolkit"](../../demos/legacy#dojo-toolkit) +Live demos are included in ["Dojo Toolkit"](/docs/demos/legacy#dojo-toolkit) :::caution diff --git a/docz/docs/02-getting-started/02-example.mdx b/docz/docs/02-getting-started/02-example.mdx index 95b6174..ff66e08 100644 --- a/docz/docs/02-getting-started/02-example.mdx +++ b/docz/docs/02-getting-started/02-example.mdx @@ -99,7 +99,7 @@ XLSX.utils.book_append_sheet(workbook, worksheet, "Dates"); The data is in the workbook and can be exported. - + There are multiple opportunities for improvement: the headers can be renamed and the column widths can be adjusted. [SheetJS Pro](https://sheetjs.com/pro) offers @@ -160,7 +160,7 @@ support other common export formats like `.xls` or `.xlsb` or `.csv`. XLSX.writeFile(workbook, "Presidents.xlsx", { compression: true }); ``` - + ## Live Demo diff --git a/docz/docs/02-getting-started/03-roadmap.md b/docz/docs/02-getting-started/03-roadmap.md index e4605bf..3011b5e 100644 --- a/docz/docs/02-getting-started/03-roadmap.md +++ b/docz/docs/02-getting-started/03-roadmap.md @@ -54,14 +54,14 @@ Utility functions help with step 3. ## Highlights -["Data Import"](../solutions/input) describes solutions for common data import +["Data Import"](/docs/solutions/input) describes solutions for common data import scenarios. -["Data Export"](../solutions/output) describes solutions for common data export +["Data Export"](/docs/solutions/output) describes solutions for common data export scenarios. -["Data Processing"](../solutions/processing) describes solutions for common +["Data Processing"](/docs/solutions/processing) describes solutions for common workbook processing and manipulation scenarios. -["Utility Functions"](../api/utilities) details utility functions for +["Utility Functions"](/docs/api/utilities) details utility functions for translating JSON Arrays and other common JS structures into worksheet objects. diff --git a/docz/docs/02-getting-started/04-zen.md b/docz/docs/02-getting-started/04-zen.md index 40bc92c..259c64d 100644 --- a/docz/docs/02-getting-started/04-zen.md +++ b/docz/docs/02-getting-started/04-zen.md @@ -15,14 +15,14 @@ Web Workers and future APIs. ### JavaScript is a powerful language for data processing -The ["Common Spreadsheet Format"](../csf/general) is a simple object +The ["Common Spreadsheet Format"](/docs/csf/general) is a simple object representation of the core concepts of a workbook. The various functions in the library provide low-level tools for working with the object. For friendly JS processing, there are utility functions for converting parts of -a worksheet to/from an Array of Arrays. The [Complete example](./02-example.mdx) +a worksheet to/from an Array of Arrays. The [Tutorial](/docs/getting-started/example) combines powerful JS Array methods with a network request library to download -data, select the information we want and create a workbook file: +data, select the information we want and create a workbook file. ### File formats are implementation details diff --git a/docz/docs/02-getting-started/index.md b/docz/docs/02-getting-started/index.md index 0325819..d8705a5 100644 --- a/docz/docs/02-getting-started/index.md +++ b/docz/docs/02-getting-started/index.md @@ -5,8 +5,8 @@ pagination_next: getting-started/example # Getting Started -["Tutorial"](./02-example.mdx) is a live example that covers general data -munging and data export to spreadsheets. +["Tutorial"](/docs/getting-started/example) is a live example that covers +general data munging and data export to spreadsheets. ## Installation diff --git a/docz/docs/03-demos/01-salesforce.md b/docz/docs/03-demos/01-salesforce.md index 9ac253c..1d14421 100644 --- a/docz/docs/03-demos/01-salesforce.md +++ b/docz/docs/03-demos/01-salesforce.md @@ -109,7 +109,7 @@ should see a page like ## Adding the Standalone Script -The [standalone script](../getting-started/installation/standalone) can be downloaded and +The [standalone script](/docs/getting-started/installation/standalone) can be downloaded and added as a static resource. Due to Salesforce naming restrictions, it will have to be renamed to `sheetjs.js` when adding the static resource. diff --git a/docz/docs/03-demos/02-mobile.md b/docz/docs/03-demos/02-mobile.md index fc46745..4e41096 100644 --- a/docz/docs/03-demos/02-mobile.md +++ b/docz/docs/03-demos/02-mobile.md @@ -22,7 +22,7 @@ Each demo section will mention test dates and platform versions. ::: -The ["JavaScript Engines"](./engines) section includes samples for JavaScript +The ["JavaScript Engines"](/docs/demos/engines) section includes samples for JavaScript engines used in the mobile app frameworks. SheetJS libraries have been tested in the relevant engines and should "just work" with some caveats. diff --git a/docz/docs/03-demos/03-desktop.md b/docz/docs/03-demos/03-desktop.md index 10e3636..0e02c7b 100644 --- a/docz/docs/03-demos/03-desktop.md +++ b/docz/docs/03-demos/03-desktop.md @@ -11,7 +11,7 @@ windowing framework. SheetJS is compatible with many app frameworks. ## NW.js -The [Standalone scripts](../getting-started/installation/standalone) can be +The [Standalone scripts](/docs/getting-started/installation/standalone) can be referenced in a `SCRIPT` tag from the entry point HTML page. This demo was tested against NW.js 0.66.0. @@ -68,7 +68,7 @@ This will generate the standalone app in the `build\sheetjs-nwjs\` folder. The standard HTML5 `FileReader` techniques from the browser apply to NW.js! NW.js handles the OS minutiae for dragging files into app windows. The -[drag and drop snippet](../solutions/input#example-user-submissions) apply +[drag and drop snippet](/docs/solutions/input#example-user-submissions) apply to DIV elements on the page. Similarly, file input elements automatically map to standard Web APIs. @@ -131,7 +131,7 @@ input.click(); ## Electron -The [NodeJS Module](../getting-started/installation/nodejs) can be imported +The [NodeJS Module](/docs/getting-started/installation/nodejs) can be imported from the main or the renderer thread. Electron presents a `fs` module. The `require('xlsx')` call loads the CommonJS @@ -188,7 +188,7 @@ For a recent Intel Mac, the path will be `out/sheetjs-electron-darwin-x64/` ### Writing Files -[`XLSX.writeFile`](../api/write-options) writes workbooks to the file system. +[`XLSX.writeFile`](/docs/api/write-options) writes workbooks to the file system. `showSaveDialog` shows a Save As dialog and returns the selected file name: ```js @@ -256,7 +256,7 @@ document.getElementById("xlf").addEventListener("change", handleFile, false); **Drag and Drop** -The [drag and drop snippet](../solutions/input#example-user-submissions) +The [drag and drop snippet](/docs/solutions/input#example-user-submissions) applies to DIV elements on the page. For example, assuming a DIV on the page: @@ -284,7 +284,7 @@ document.getElementById("drop").addEventListener("drop", handleDrop, false); **Electron API** -[`XLSX.readFile`](../api/parse-options) reads workbooks from the file system. +[`XLSX.readFile`](/docs/api/parse-options) reads workbooks from the file system. `showOpenDialog` shows a Save As dialog and returns the selected file name. Unlike the Web APIs, the `showOpenDialog` flow can be initiated by app code: @@ -351,7 +351,7 @@ call is required to enable Developer Tools in the window. ## Tauri -The [NodeJS Module](../getting-started/installation/nodejs) can be imported +The [NodeJS Module](/docs/getting-started/installation/nodejs) can be imported from JavaScript code. This demo was tested against Tauri 1.0.5 on 2022 August 13. @@ -555,7 +555,7 @@ async function saveFile(wb) { ## Wails -The [NodeJS Module](../getting-started/installation/nodejs) can be imported +The [NodeJS Module](/docs/getting-started/installation/nodejs) can be imported from JavaScript code. This demo was tested against Wails `v2.0.0-beta.44.2` on 2022 August 31 using @@ -767,7 +767,7 @@ async function exportFile(wb) { ## NeutralinoJS -The [Standalone build](../getting-started/installation/standalone) can be added +The [Standalone build](/docs/getting-started/installation/standalone) can be added to the entry `index.html` This demo was tested against "binaries" `4.7.0` and "client" `3.6.0` @@ -1003,7 +1003,7 @@ async function saveFile(wb) { ## React Native Windows -The [NodeJS Module](../getting-started/installation/nodejs) can be imported +The [NodeJS Module](/docs/getting-started/installation/nodejs) can be imported from the main app script. File operations must be written in native code. This demo was tested against `v0.69.6` on 2022 September 07 in Windows 10. @@ -1360,7 +1360,7 @@ async() => { ## React Native MacOS -The [NodeJS Module](../getting-started/installation/nodejs) can be imported +The [NodeJS Module](/docs/getting-started/installation/nodejs) can be imported from the main app script. File operations must be written in native code. This demo was tested against `v0.64.30` on 2022 September 10 in MacOS 12.4 diff --git a/docz/docs/03-demos/04-grid.md b/docz/docs/03-demos/04-grid.md index e65f544..8df043c 100644 --- a/docz/docs/03-demos/04-grid.md +++ b/docz/docs/03-demos/04-grid.md @@ -213,7 +213,7 @@ through a special Export button. It handles the SheetJS operations internally. This UI Grid is for AngularJS, not the modern Angular. New projects should not use AngularJS. This demo is included for legacy applications. -The [AngularJS demo](./legacy#angularjs) covers more general strategies. +The [AngularJS demo](/docs/demos/legacy#angularjs) covers more general strategies. ::: diff --git a/docz/docs/03-demos/05-database.md b/docz/docs/03-demos/05-database.md index 05b1120..b053e48 100644 --- a/docz/docs/03-demos/05-database.md +++ b/docz/docs/03-demos/05-database.md @@ -16,7 +16,7 @@ database systems. The examples are merely intended to demonstrate very basic functionality. Key-value stores, unstructured use of Document Databases, and other schema-less -databases are covered in the [NoSQL demo](./nosql). +databases are covered in the [NoSQL demo](/docs/demos/nosql). ## Structured Tables diff --git a/docz/docs/03-demos/06-content.md b/docz/docs/03-demos/06-content.md index 459d99b..fc3d928 100644 --- a/docz/docs/03-demos/06-content.md +++ b/docz/docs/03-demos/06-content.md @@ -106,7 +106,7 @@ in the parsing logic, issues should then be raised with the SheetJS project. :::note -Library integration in ViteJS is covered in ["Bundlers" demo](./bundler#vite) +Library integration in ViteJS is covered in ["Bundlers" demo](/docs/demos/bundler#vite) ::: diff --git a/docz/docs/03-demos/07-worker.md b/docz/docs/03-demos/07-worker.md index 96611aa..d7c7439 100644 --- a/docz/docs/03-demos/07-worker.md +++ b/docz/docs/03-demos/07-worker.md @@ -17,7 +17,7 @@ added later. Feature testing is highly recommended. ## Installation -In all cases, `importScripts` can load the [Standalone scripts](../getting-started/installation/standalone) +In all cases, `importScripts` can load the [Standalone scripts](/docs/getting-started/installation/standalone) ```js importScripts("https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js"); diff --git a/docz/docs/03-demos/11-angular.md b/docz/docs/03-demos/11-angular.md index 77d02e2..c4ee60a 100644 --- a/docz/docs/03-demos/11-angular.md +++ b/docz/docs/03-demos/11-angular.md @@ -14,8 +14,8 @@ and TypeScript familiarity is assumed. Other demos cover general Angular deployments, including: -- [iOS and Android applications powered by NativeScript](./mobile#nativescript) -- [iOS and Android applications powered by Ionic](./mobile#ionic) +- [iOS and Android applications powered by NativeScript](/docs/demos/mobile#nativescript) +- [iOS and Android applications powered by Ionic](/docs/demos/mobile#ionic) :::warning @@ -28,7 +28,7 @@ should be directed to the Angular project. ## Installation -[The "Frameworks" section](../getting-started/installation/frameworks) covers +[The "Frameworks" section](/docs/getting-started/installation/frameworks) covers installation with `pnpm` and other package managers. The library can be imported directly from JS or TS code with: @@ -324,7 +324,7 @@ In the component, `aoa_to_sheet` is used to generate the worksheet: The default angular-cli configuration requires no additional configuration. Some deployments use the SystemJS loader, which does require configuration. -[The SystemJS demo](./bundler#systemjs) describe the required settings. +[The SystemJS demo](/docs/demos/bundler#systemjs) describe the required settings. ### Legacy Demo diff --git a/docz/docs/03-demos/12-react.md b/docz/docs/03-demos/12-react.md index f6103c9..0293b54 100644 --- a/docz/docs/03-demos/12-react.md +++ b/docz/docs/03-demos/12-react.md @@ -9,15 +9,15 @@ familiarity is assumed. Other demos cover general React deployments, including: -- [Static Site Generation powered by NextJS](./content#nextjs) -- [iOS and Android applications powered by React Native](./mobile#react-native) -- [Desktop application powered by React-Native-Windows](./desktop#react-native-windows) -- [React Data Grid UI component](./grid#react-data-grid) +- [Static Site Generation powered by NextJS](/docs/demos/content#nextjs) +- [iOS and Android applications powered by React Native](/docs/demos/mobile#react-native) +- [Desktop application powered by React-Native-Windows](/docs/demos/desktop#react-native-windows) +- [React Data Grid UI component](/docs/demos/grid#react-data-grid) ## Installation -[The "Frameworks" section](../getting-started/installation/frameworks) covers +[The "Frameworks" section](/docs/getting-started/installation/frameworks) covers installation with Yarn and other package managers. The library can be imported directly from JS or JSX code with: @@ -171,7 +171,7 @@ generate column headings and for indexing into the row objects. The safest approach is to use an array of arrays for state and to generate column objects that map to A1-Style column headers. -The [React Data Grid demo](./grid#rows-and-columns-state) uses this approach +The [React Data Grid demo](/docs/demos/grid#rows-and-columns-state) uses this approach with the following column and row structure: ```js @@ -195,7 +195,7 @@ const columns = Array.from({ length: range.e.c + 1 }, (_, i) => ({ ## Legacy Deployments -[The Standalone Scripts](../getting-started/installation/standalone) play nice +[The Standalone Scripts](/docs/getting-started/installation/standalone) play nice with legacy deployments that do not use a bundler. [The legacy demo](pathname:///react/index.html) shows a simple React component diff --git a/docz/docs/03-demos/13-vue.md b/docz/docs/03-demos/13-vue.md index b5237eb..25e672f 100644 --- a/docz/docs/03-demos/13-vue.md +++ b/docz/docs/03-demos/13-vue.md @@ -9,15 +9,15 @@ Components (SFC) and VueJS familiarity is assumed. Other demos cover general VueJS deployments, including: -- [Static Site Generation powered by NuxtJS](./content#nuxtjs) -- [iOS and Android applications powered by Quasar](./mobile#quasar) -- [Desktop application powered by Tauri](./desktop#tauri) -- [`vue3-table-lite` UI component](./grid#vue3-table-lite) +- [Static Site Generation powered by NuxtJS](/docs/demos/content#nuxtjs) +- [iOS and Android applications powered by Quasar](/docs/demos/mobile#quasar) +- [Desktop application powered by Tauri](/docs/demos/desktop#tauri) +- [`vue3-table-lite` UI component](/docs/demos/grid#vue3-table-lite) ## Installation -[The "Frameworks" section](../getting-started/installation/frameworks) covers +[The "Frameworks" section](/docs/getting-started/installation/frameworks) covers installation with Yarn and other package managers. The library can be imported directly from JS or JSX code with: @@ -163,7 +163,7 @@ generate column headings and for indexing into the row objects. The safest approach is to use an array of arrays for state and to generate column objects that map to A1-Style column headers. -The [`vue3-table-lite` demo](./grid#rows-and-columns-bindings) generates rows +The [`vue3-table-lite` demo](/docs/demos/grid#rows-and-columns-bindings) generates rows and columns objects with the following structure: ```js @@ -183,7 +183,7 @@ columns.value = Array.from({ length: range.e.c + 1 }, (_, i) => ({ ## Legacy Deployments -[The Standalone Scripts](../getting-started/installation/standalone) play nice +[The Standalone Scripts](/docs/getting-started/installation/standalone) play nice with legacy deployments that do not use a bundler. The legacy demos show a simple VueJS component. It is written in ES5 syntax. diff --git a/docz/docs/03-demos/14-svelte.md b/docz/docs/03-demos/14-svelte.md index 14b5b90..155bc8e 100644 --- a/docz/docs/03-demos/14-svelte.md +++ b/docz/docs/03-demos/14-svelte.md @@ -9,13 +9,13 @@ familiarity is assumed. Other demos cover general Svelte deployments, including: -- [iOS applications powered by CapacitorJS](./mobile#capacitorjs) -- [Desktop application powered by Wails](./desktop#wails) +- [iOS applications powered by CapacitorJS](/docs/demos/mobile#capacitorjs) +- [Desktop application powered by Wails](/docs/demos/desktop#wails) ## Installation -[The "Frameworks" section](../getting-started/installation/frameworks) covers +[The "Frameworks" section](/docs/getting-started/installation/frameworks) covers installation with Yarn and other package managers. The library can be imported directly from Svelte files with: diff --git a/docz/docs/03-demos/19-bundler.md b/docz/docs/03-demos/19-bundler.md index 62e9429..83fefa5 100644 --- a/docz/docs/03-demos/19-bundler.md +++ b/docz/docs/03-demos/19-bundler.md @@ -29,7 +29,7 @@ var XLSX = require("xlsx"); // ... use XLSX ... ``` -[After installing the module](../getting-started/installation/nodejs), bundling is easy: +[After installing the module](/docs/getting-started/installation/nodejs), bundling is easy: ```bash browserify app.js > browserify.js @@ -170,9 +170,9 @@ bun bun.js ## Dojo -Integration details are included [in the "AMD" installation](../getting-started/installation/amd#dojo-toolkit) +Integration details are included [in the "AMD" installation](/docs/getting-started/installation/amd#dojo-toolkit) -Complete Examples are included [in the "Dojo" demo](./legacy#dojo-toolkit) +Complete Examples are included [in the "Dojo" demo](/docs/demos/legacy#dojo-toolkit) ## esbuild @@ -356,7 +356,7 @@ bug. Upgrade to Parcel version 1.5.0 or later. <details><summary><b>Complete Example</b> (click to show)</summary> -This demo follows the [Presidents Example](../getting-started/example). +This demo follows the [Presidents Example](/docs/getting-started/example). 1) Save the following to `index.html`: @@ -438,7 +438,7 @@ click the "Click to Export!" button to generate a file. ## RequireJS -[Standalone scripts](../getting-started/installation/standalone) comply with AMD `define` +[Standalone scripts](/docs/getting-started/installation/standalone) comply with AMD `define` semantics, enabling use in RequireJS out of the box. To enable use of the alias `xlsx`, the RequireJS config should set an alias in @@ -1061,7 +1061,7 @@ Access http://localhost:8080 in your web browser. :::note -The [Vite section of the Content demo](./content#vitejs) covers SheetJS-powered +The [Vite section of the Content demo](/docs/demos/content#vitejs) covers SheetJS-powered asset loaders, suitable for static sites pulling data from fixed spreadsheets. ::: @@ -1079,7 +1079,7 @@ Webpack bundled the CommonJS build in older versions of the library. Version `0.18.1` changed the NodeJS module package so that Webpack uses the ESM build. The ESM build does not include the codepage support library for XLS reading. -[As described in the installation instructions](../getting-started/installation/frameworks), +[As described in the installation instructions](/docs/getting-started/installation/frameworks), the codepage dependency should be imported explicitly: ```js diff --git a/docz/docs/03-demos/24-extendscript.md b/docz/docs/03-demos/24-extendscript.md index cf29135..3eb623d 100644 --- a/docz/docs/03-demos/24-extendscript.md +++ b/docz/docs/03-demos/24-extendscript.md @@ -21,7 +21,7 @@ extension development is assumed. ## ExtendScript Scripts -[Installation is straightforward:](../getting-started/installation/extendscript) download a +[Installation is straightforward:](/docs/getting-started/installation/extendscript) download a script and move it to your project directory. ### Reading Files @@ -177,12 +177,12 @@ and place in the scripts directory. For CS6 Windows 10 the path is typically ## CEP -[The standalone scripts](../getting-started/installation/standalone) can be added to CEP +[The standalone scripts](/docs/getting-started/installation/standalone) can be added to CEP extension HTML ## UXP UXP officially recommends `require` and NodeJS Modules for third party support. -[Use the "Frameworks" instructions to download.](../getting-started/installation/frameworks) +[Use the "Frameworks" instructions to download.](/docs/getting-started/installation/frameworks) diff --git a/docz/docs/03-demos/26-excelapi.md b/docz/docs/03-demos/26-excelapi.md index 8949739..9720fe0 100644 --- a/docz/docs/03-demos/26-excelapi.md +++ b/docz/docs/03-demos/26-excelapi.md @@ -125,7 +125,7 @@ This indicates that the SheetJS library has been loaded. ## Dynamic Arrays and SheetJS Array of Arrays -The [`sheet_to_json`](../api/utilities#json) helper function can generate +The [`sheet_to_json`](/docs/api/utilities#json) helper function can generate arrays of arrays of values based on the worksheet data. Excel custom functions transparently treat these as Dynamic Arrays. @@ -165,7 +165,7 @@ var wb = XLSX.read(ab); // parse workbook For the purposes of this demo, a Base64-encoded file will be used. The workaround involves fetching that Base64 file, getting the text, and parsing -with the [`base64` type:](../api/parse-options#input-type) +with the [`base64` type:](/docs/api/parse-options#input-type) ```js async function extern() { diff --git a/docz/docs/03-demos/33-localfile.md b/docz/docs/03-demos/33-localfile.md index 6f7004f..1a4759c 100644 --- a/docz/docs/03-demos/33-localfile.md +++ b/docz/docs/03-demos/33-localfile.md @@ -15,8 +15,8 @@ like mobile apps are covered in their respective demos. Some snippets are also available in the "Common Use Cases" section: -- [Data Import](../solutions/input) -- [Data Export](../solutions/output) +- [Data Import](/docs/solutions/input) +- [Data Export](/docs/solutions/output) ::: @@ -70,7 +70,7 @@ self.addEventListener('message', (e) => { }); ``` -["User-Submitted File" example](./worker#user-submitted-file) has a live demo. +["User-Submitted File" example](/docs/demos/worker#user-submitted-file) has a live demo. </details> @@ -130,7 +130,7 @@ XLSX.writeFile(wb, "SheetJS.xlsx"); The workaround is to generate the file data from the Worker (using `XLSX.write`) and send the data back to the main context for the actual download action. -["Creating a Local File" includes a live demo](./worker#creating-a-local-file). +["Creating a Local File" includes a live demo](/docs/demos/worker#creating-a-local-file). ::: @@ -358,7 +358,7 @@ var wb = XLSX.readFile("sheetjs.numbers"); XLSX.writeFile(wb, "sheetjs.xls"); ``` -[Installation](../getting-started/installation/nodejs) has a special note for +[Installation](/docs/getting-started/installation/nodejs) has a special note for use with NodeJS ECMAScript Modules: ```js @@ -419,6 +419,6 @@ writeFile(wb, "sheetjs.xlsx"); Desktop and mobile apps have their own specific APIs covered in separate demos: -- [Electron and other desktop apps](./desktop) -- [React Native and other mobile apps](./mobile) +- [Electron and other desktop apps](/docs/demos/desktop) +- [React Native and other mobile apps](/docs/demos/mobile) diff --git a/docz/docs/03-demos/41-nosql.md b/docz/docs/03-demos/41-nosql.md index 7d64227..ae96701 100644 --- a/docz/docs/03-demos/41-nosql.md +++ b/docz/docs/03-demos/41-nosql.md @@ -11,7 +11,7 @@ entries in the database. K/V stores and Objects add additional restrictions. :::note These data stores are capable of storing structured data. Those use cases are -covered in the [Database demo](./database). +covered in the [Database demo](/docs/demos/database). ::: @@ -212,7 +212,7 @@ Open `SheetJSRedis.xlsx` and verify the columns have the correct data `Database#allDocs` is the standard approach for bulk data export. The generated row objects have additional `_id` and `_rev` keys that should be removed. -Nested objects must be flattened. The ["Tutorial"](../getting-started/example) +Nested objects must be flattened. The ["Tutorial"](/docs/getting-started/example) includes an example of constructing a simple array. ```js diff --git a/docz/docs/03-demos/42-headless.md b/docz/docs/03-demos/42-headless.md index 94d3a2b..9c99450 100644 --- a/docz/docs/03-demos/42-headless.md +++ b/docz/docs/03-demos/42-headless.md @@ -9,7 +9,7 @@ Headless automation involves controlling "headless browsers" to access websites and submit or download data. It is also possible to automate browsers using custom browser extensions. -The [SheetJS standalone script](../getting-started/installation/standalone) can be added to +The [SheetJS standalone script](/docs/getting-started/installation/standalone) can be added to any website by inserting a `SCRIPT` tag. Headless browsers usually provide utility functions for running custom snippets in the browser and passing data back to the automation script. diff --git a/docz/docs/03-demos/44-legacy.md b/docz/docs/03-demos/44-legacy.md index 78b53a8..b1789e2 100644 --- a/docz/docs/03-demos/44-legacy.md +++ b/docz/docs/03-demos/44-legacy.md @@ -13,7 +13,7 @@ SheetJS libraries strive to maintain broad browser and JS engine compatibility. ## Integration -The ["Standalone Browser Scripts"](../getting-started/installation/standalone) section has +The ["Standalone Browser Scripts"](/docs/getting-started/installation/standalone) section has instructions for obtaining or referencing the standalone scripts. These are designed to be referenced with `<script>` tags. @@ -309,7 +309,7 @@ _Live Demos_ - [Fetch JSON and generate a workbook](pathname:///dojo/write.html) -The ["AMD" instructions](../getting-started/installation/amd#dojo-toolkit) +The ["AMD" instructions](/docs/getting-started/installation/amd#dojo-toolkit) includes details for use with `require`. <details><summary><b>Integration in the demos</b> (click to show)</summary> @@ -334,8 +334,8 @@ require(["dojo/request/xhr", "xlsx"], function(xhr, _XLSX) { </details> -The ["Dojo" section in "Bundlers"](./bundler#dojo) includes a complete example -mirroring the [official example](../getting-started/example) +The ["Dojo" section in "Bundlers"](/docs/demos/bundler#dojo) includes a complete example +mirroring the [official example](/docs/getting-started/example) <details><summary><b>Details</b> (click to show)</summary> diff --git a/docz/docs/03-demos/index.md b/docz/docs/03-demos/index.md index 6c42e7a..ff851a9 100644 --- a/docz/docs/03-demos/index.md +++ b/docz/docs/03-demos/index.md @@ -10,73 +10,73 @@ run in the web browser, demos will include interactive examples. ### JavaScript APIs -- [`XMLHttpRequest and fetch`](./network) -- [`Clipboard Data`](./clipboard) -- [`Web Workers`](./worker) -- [`Typed Arrays for Machine Learning`](./ml) -- [`Local File Access`](./localfile) -- [`LocalStorage and SessionStorage`](./database#localstorage-and-sessionstorage) -- [`Web SQL Database`](./database#websql) -- [`IndexedDB`](./database#indexeddb) +- [`XMLHttpRequest and fetch`](/docs/demos/network) +- [`Clipboard Data`](/docs/demos/clipboard) +- [`Web Workers`](/docs/demos/worker) +- [`Typed Arrays for Machine Learning`](/docs/demos/ml) +- [`Local File Access`](/docs/demos/localfile) +- [`LocalStorage and SessionStorage`](/docs/demos/database#localstorage-and-sessionstorage) +- [`Web SQL Database`](/docs/demos/database#websql) +- [`IndexedDB`](/docs/demos/database#indexeddb) ### Frameworks -- [`Angular`](./angular) -- [`React`](./react) -- [`Svelte`](./svelte) -- [`VueJS`](./vue) -- [`Angular.JS`](./legacy#angularjs) -- [`Dojo`](./legacy#dojo-toolkit) -- [`Knockout`](./legacy#knockout) +- [`Angular`](/docs/demos/angular) +- [`React`](/docs/demos/react) +- [`Svelte`](/docs/demos/svelte) +- [`VueJS`](/docs/demos/vue) +- [`Angular.JS`](/docs/demos/legacy#angularjs) +- [`Dojo`](/docs/demos/legacy#dojo-toolkit) +- [`Knockout`](/docs/demos/legacy#knockout) ### Front-End UI Components -- [`canvas-datagrid`](./grid#canvas-datagrid) -- [`x-spreadsheet`](./grid#x-spreadsheet) -- [`react-data-grid`](./grid#react-data-grid) -- [`vue3-table-lite`](./grid#vue3-table-lite) -- [`angular-ui-grid`](./grid#angular-ui-grid) -- [`material ui`](./grid#material-ui-table) +- [`canvas-datagrid`](/docs/demos/grid#canvas-datagrid) +- [`x-spreadsheet`](/docs/demos/grid#x-spreadsheet) +- [`react-data-grid`](/docs/demos/grid#react-data-grid) +- [`vue3-table-lite`](/docs/demos/grid#vue3-table-lite) +- [`angular-ui-grid`](/docs/demos/grid#angular-ui-grid) +- [`material ui`](/docs/demos/grid#material-ui-table) ### Platforms and Integrations -- [`Command-Line Tools`](./cli) -- [`iOS and Android Mobile Applications`](./mobile) -- [`NodeJS Server-Side Processing`](./server#nodejs) -- [`Deno Server-Side Processing`](./server#deno) -- [`Content Management and Static Sites`](./content) -- [`Electron`](./desktop#electron) -- [`NW.js`](./desktop#nwjs) -- [`Tauri`](./desktop#tauri) -- [`Wails`](./desktop#wails) -- [`Chrome and Chromium Extensions`](./chromium) -- [`Google Sheets API`](./gsheet) -- [`ExtendScript for Adobe Apps`](./extendscript) -- [`NetSuite SuiteScript`](./netsuite) -- [`Salesforce Lightning Web Components`](./salesforce) -- [`Excel JavaScript API`](./excelapi) -- [`Headless Automation`](./headless) -- [`Other JavaScript Engines`](./engines) -- [`Azure Functions and Storage`](./azure) -- [`Amazon Web Services`](./aws) -- [`Databases and Structured Data Stores`](./database) -- [`NoSQL and Unstructured Data Stores`](./nosql) -- [`Legacy Internet Explorer`](./legacy#internet-explorer) +- [`Command-Line Tools`](/docs/demos/cli) +- [`iOS and Android Mobile Applications`](/docs/demos/mobile) +- [`NodeJS Server-Side Processing`](/docs/demos/server#nodejs) +- [`Deno Server-Side Processing`](/docs/demos/server#deno) +- [`Content Management and Static Sites`](/docs/demos/content) +- [`Electron`](/docs/demos/desktop#electron) +- [`NW.js`](/docs/demos/desktop#nwjs) +- [`Tauri`](/docs/demos/desktop#tauri) +- [`Wails`](/docs/demos/desktop#wails) +- [`Chrome and Chromium Extensions`](/docs/demos/chromium) +- [`Google Sheets API`](/docs/demos/gsheet) +- [`ExtendScript for Adobe Apps`](/docs/demos/extendscript) +- [`NetSuite SuiteScript`](/docs/demos/netsuite) +- [`Salesforce Lightning Web Components`](/docs/demos/salesforce) +- [`Excel JavaScript API`](/docs/demos/excelapi) +- [`Headless Automation`](/docs/demos/headless) +- [`Other JavaScript Engines`](/docs/demos/engines) +- [`Azure Functions and Storage`](/docs/demos/azure) +- [`Amazon Web Services`](/docs/demos/aws) +- [`Databases and Structured Data Stores`](/docs/demos/database) +- [`NoSQL and Unstructured Data Stores`](/docs/demos/nosql) +- [`Legacy Internet Explorer`](/docs/demos/legacy#internet-explorer) ### Bundlers and Tooling -- [`browserify`](./bundler#browserify) -- [`bun`](./bundler#bun) -- [`esbuild`](./bundler#esbuild) -- [`parcel`](./bundler#parcel) -- [`requirejs`](./bundler#requirejs) -- [`rollup`](./bundler#rollup) -- [`snowpack`](./bundler#snowpack) -- [`swc`](./bundler#swc) -- [`systemjs`](./bundler#systemjs) -- [`vite`](./bundler#vite) -- [`webpack`](./bundler#webpack) -- [`wmr`](./bundler#wmr) +- [`browserify`](/docs/demos/bundler#browserify) +- [`bun`](/docs/demos/bundler#bun) +- [`esbuild`](/docs/demos/bundler#esbuild) +- [`parcel`](/docs/demos/bundler#parcel) +- [`requirejs`](/docs/demos/bundler#requirejs) +- [`rollup`](/docs/demos/bundler#rollup) +- [`snowpack`](/docs/demos/bundler#snowpack) +- [`swc`](/docs/demos/bundler#swc) +- [`systemjs`](/docs/demos/bundler#systemjs) +- [`vite`](/docs/demos/bundler#vite) +- [`webpack`](/docs/demos/bundler#webpack) +- [`wmr`](/docs/demos/bundler#wmr) :::note diff --git a/docz/docs/06-solutions/01-input.md b/docz/docs/06-solutions/01-input.md index 10f0a17..8713fbf 100644 --- a/docz/docs/06-solutions/01-input.md +++ b/docz/docs/06-solutions/01-input.md @@ -30,7 +30,7 @@ var workbook = XLSX.readFile(filename, opts); The `readFile` method attempts to read a spreadsheet file at the supplied path. -The second `opts` argument is optional. ["Parsing Options"](../api/parse-options) +The second `opts` argument is optional. ["Parsing Options"](/docs/api/parse-options) covers the supported properties and behaviors. :::warning @@ -47,7 +47,7 @@ Deno scripts must be invoked with `--allow-read` to read from the filesystem. Here are a few common scenarios (click on each subtitle to see the code). -The [demos](../demos) cover special deployments in more detail. +The [demos](/docs/demos) cover special deployments in more detail. ### Example: Local File @@ -90,13 +90,13 @@ var XLSX = require("xlsx"); var workbook = XLSX.readFile(path); ``` -Electron APIs have changed over time. The [`electron` demo](../demos/desktop#electron) +Electron APIs have changed over time. The [`electron` demo](/docs/demos/desktop#electron) shows a complete example and details the required version-specific settings. </TabItem> <TabItem value="reactnative" label="React Native"> -[The React Native Demo](../demos/mobile#rn-file-plugins) covers tested plugins. +[The React Native Demo](/docs/demos/mobile#rn-file-plugins) covers tested plugins. </TabItem> <TabItem value="extendscript" label="Photoshop"> @@ -121,7 +121,7 @@ var thisFile = File.openDialog("Select a spreadsheet"); var workbook = XLSX.readFile(thisFile.absoluteURI); ``` -The [`extendscript` demo](../demos/extendscript) includes a more complex example. +The [`extendscript` demo](/docs/demos/extendscript) includes a more complex example. </TabItem> <TabItem value="deno" label="Deno"> @@ -295,7 +295,7 @@ input_dom_element.addEventListener("change", handleFile, false); </TabItem> </Tabs> -The [`oldie` demo](../demos/legacy#internet-explorer) shows an IE-compatible fallback scenario. +The [`oldie` demo](/docs/demos/legacy#internet-explorer) shows an IE-compatible fallback scenario. </TabItem> <TabItem value="nodejs" label="NodeJS"> @@ -321,7 +321,7 @@ const server = http.createServer((req, res) => { }).listen(process.env.PORT || 7262); ``` -The [`server` demo](../demos/server) has more advanced examples. +The [`server` demo](/docs/demos/server) has more advanced examples. </TabItem> <TabItem value="deno" label="Deno"> @@ -424,7 +424,7 @@ req.onload = function(e) { req.send(); ``` -The [`xhr` demo](../demos/network) includes a longer discussion and more examples. +The [`xhr` demo](/docs/demos/network) includes a longer discussion and more examples. <https://oss.sheetjs.com/sheetjs/ajax.html> shows fallback approaches for IE6+. @@ -477,7 +477,7 @@ const url = "https://oss.sheetjs.com/test_files/formula_stress_test.xlsx"; </TabItem> <TabItem value="bun" label="Bun"> -Bun has native support for `fetch`. Using the [NodeJS package](../getting-started/installation/nodejs): +Bun has native support for `fetch`. Using the [NodeJS package](/docs/getting-started/installation/nodejs): ```js import * as XLSX from 'xlsx/xlsx.mjs'; @@ -663,7 +663,7 @@ console.log(wb.SheetNames);`}</code></pre> </TabItem> </Tabs> -More detailed examples are covered in the [included demos](../demos/) +More detailed examples are covered in the [included demos](/docs/demos/) ## Processing JSON and JS Data @@ -703,7 +703,7 @@ var worksheet = XLSX.utils.aoa_to_sheet([ ]); ``` -["Array of Arrays Input"](../api/utilities#array-of-arrays-input) describes the function and the +["Array of Arrays Input"](/docs/api/utilities#array-of-arrays-input) describes the function and the optional `opts` argument in more detail. @@ -718,25 +718,25 @@ generating a worksheet object. By default, it will generate a header row and one row per object in the array. The optional `opts` argument has settings to control the column order and header output. -["Array of Objects Input"](../api/utilities#array-of-objects-input) describes the function and +["Array of Objects Input"](/docs/api/utilities#array-of-objects-input) describes the function and the optional `opts` argument in more detail. #### Examples -["Complete Example"](../getting-started/example) contains a detailed example +["Complete Example"](/docs/getting-started/example) contains a detailed example "Get Data from a JSON Endpoint and Generate a Workbook" [`x-spreadsheet`](https://github.com/myliang/x-spreadsheet) is an interactive data grid for previewing and modifying structured data in the web browser. The -[demo](../demos/grid#x-spreadsheet) includes more detailed examples. +[demo](/docs/demos/grid#x-spreadsheet) includes more detailed examples. -["Typed Arrays and ML"](../demos/ml) covers strategies for +["Typed Arrays and ML"](/docs/demos/ml) covers strategies for creating worksheets from ML library exports (datasets stored in Typed Arrays). <details> <summary><b>Records from a database query (SQL or no-SQL)</b> (click to show)</summary> -The [`database` demo](../demos/database/) includes examples of working with +The [`database` demo](/docs/demos/database/) includes examples of working with databases and query results. </details> @@ -754,7 +754,7 @@ var worksheet = XLSX.utils.table_to_sheet(dom_element, opts); The `table_to_sheet` utility function takes a DOM TABLE element and iterates through the rows to generate a worksheet. The `opts` argument is optional. -["HTML Table Input"](../api/utilities#html-table-input) describes the function in more detail. +["HTML Table Input"](/docs/api/utilities#html-table-input) describes the function in more detail. @@ -774,7 +774,7 @@ is missing or no options are specified, the default name `Sheet1` is used. #### Examples -The [Headless Demo](../demos/headless) includes examples of +The [Headless Demo](/docs/demos/headless) includes examples of server-side spreadsheet generation from HTML TABLE elements using headless Chromium ("Puppeteer") and other browsers ("Playwright") @@ -831,7 +831,7 @@ var workbook = XLSX.read(htmlstr, {type:"string"}); <details> <summary><b>Chrome/Chromium Extension</b> (click to show)</summary> -The [`chrome` demo](../demos/chromium/) shows a complete example and details the required +The [`chrome` demo](/docs/demos/chromium/) shows a complete example and details the required permissions and other settings. In an extension, it is recommended to generate the workbook in a content script diff --git a/docz/docs/06-solutions/03-processing.md b/docz/docs/06-solutions/03-processing.md index 8566c61..d67ea0a 100644 --- a/docz/docs/06-solutions/03-processing.md +++ b/docz/docs/06-solutions/03-processing.md @@ -4,11 +4,11 @@ sidebar_position: 3 # Data Processing -The ["Common Spreadsheet Format"](../csf/general) is a simple object +The ["Common Spreadsheet Format"](/docs/csf/general) is a simple object representation of the core concepts of a workbook. The utility functions work with the object representation and are intended to handle common use cases. -The [Data Input](./input) and [Data Output](./output) sections cover how to +The [Data Input](/docs/solutions/input) and [Data Output](/docs/solutions/output) sections cover how to read from data sources and write to data sources. ## Workbook @@ -124,7 +124,7 @@ workbook.Workbook.Names.push({ }); ``` -This is described in more detail in ["Workbook Object"](../csf/book#defined-names). +This is described in more detail in ["Workbook Object"](/docs/csf/book#defined-names). _Set Workbook Properties_ @@ -134,7 +134,7 @@ wb.Props["Company"] = "SheetJS LLC"; ``` The full set of property names, and their mapping to the Excel UI, is included -in ["File Properties"](../csf/book#file-properties) +in ["File Properties"](/docs/csf/book#file-properties) ## Worksheet @@ -165,7 +165,7 @@ XLSX.utils.sheet_add_aoa(worksheet, [ ], { origin: "B3" }); ``` -["Array of Arrays Input"](../api/utilities#array-of-arrays-input) describes the +["Array of Arrays Input"](/docs/api/utilities#array-of-arrays-input) describes the function and the optional `opts` argument in more detail. #### Examples @@ -189,7 +189,7 @@ if(!worksheet["!merges"]) worksheet["!merges"] = []; worksheet["!merges"].push(XLSX.utils.decode_range("A1:E1")); ``` -The `!merges` property of a worksheet object is a list of [Cell Ranges](../csf/general#cell-ranges). +The `!merges` property of a worksheet object is a list of [Cell Ranges](/docs/csf/general#cell-ranges). The data for the cell will be taken from the top-left cell. A range can be created with `decode_range` or specified manually: diff --git a/docz/docs/06-solutions/05-output.md b/docz/docs/06-solutions/05-output.md index cab7528..6106bd2 100644 --- a/docz/docs/06-solutions/05-output.md +++ b/docz/docs/06-solutions/05-output.md @@ -23,7 +23,7 @@ memory. By default, XLSX files are generated, but that can be controlled with the `bookType` property of the `opts` argument. Based on the `type` option, the data can be stored as a "binary string", JS string, `Uint8Array` or Buffer. -The second `opts` argument is required. ["Writing Options"](../api/write-options) +The second `opts` argument is required. ["Writing Options"](/docs/api/write-options) covers the supported properties and behaviors. _Generate and attempt to save file_ @@ -36,7 +36,7 @@ The `writeFile` method packages the data and attempts to save the new file. The export file format is determined by the extension of `filename` (`SheetJS.xlsx` signals XLSX export, `SheetJS.xlsb` signals XLSB export, etc). -The second `opts` argument is optional. ["Writing Options"](../api/write-options) +The second `opts` argument is optional. ["Writing Options"](/docs/api/write-options) covers the supported properties and behaviors. _Generate and attempt to save an XLSX file_ @@ -50,7 +50,7 @@ great for developer experience but not amenable to tree shaking using the current developer tools. When only XLSX exports are needed, this method avoids referencing the other export functions. -The second `opts` argument is optional. ["Writing Options"](../api/write-options) +The second `opts` argument is optional. ["Writing Options"](/docs/api/write-options) covers the supported properties and behaviors. :::note @@ -64,7 +64,7 @@ files. The APIs do not generally provide feedback on whether files were created. Here are a few common scenarios (click on each subtitle to see the code). -The [demos](../demos) cover special deployments in more detail. +The [demos](/docs/demos) cover special deployments in more detail. ### Example: Local File @@ -165,7 +165,7 @@ Downloadify.create(id,{ }); ``` -The [`oldie` demo](../demos/legacy#internet-explorer) shows an IE-compatible fallback scenario. +The [`oldie` demo](/docs/demos/legacy#internet-explorer) shows an IE-compatible fallback scenario. </details> @@ -235,13 +235,13 @@ var XLSX = require("xlsx"); XLSX.writeFile(workbook, "out.xlsb"); ``` -Electron APIs have changed over time. The [`electron` demo](../demos/desktop#electron) +Electron APIs have changed over time. The [`electron` demo](/docs/demos/desktop#electron) shows a complete example and details the required version-specific settings. </TabItem> <TabItem value="reactnative" label="React Native"> -[The React Native Demo](../demos/mobile#rn-file-plugins) covers tested plugins. +[The React Native Demo](/docs/demos/mobile#rn-file-plugins) covers tested plugins. </TabItem> <TabItem value="extendscript" label="Photoshop"> @@ -258,12 +258,12 @@ var thisFile = File.saveDialog("Select an output file", "*.xlsx;*.xls"); XLSX.writeFile(workbook, thisFile.absoluteURI); ``` -The [`extendscript` demo](../demos/extendscript) includes a more complex example. +The [`extendscript` demo](/docs/demos/extendscript) includes a more complex example. </TabItem> <TabItem value="headless" label="Headless"> -The [`headless` demo](../demos/headless) includes complete +The [`headless` demo](/docs/demos/headless) includes complete examples of converting HTML TABLE elements to XLSB workbooks using Puppeteer and other headless automation tools. @@ -497,7 +497,7 @@ is to adjust the server process or Lambda function to accept Base64 strings. ::: -A complete example using XHR is [included in the XHR demo](../demos/network), +A complete example using XHR is [included in the XHR demo](/docs/demos/network), along with examples for fetch and wrapper libraries. Under normal circumstances, a `Blob` can be generated from the `array` output: @@ -561,7 +561,7 @@ fetch("https://thisis.a.test/upload", { method: 'POST', body: formdata }); JSON and JS data tend to represent single worksheets. The utility functions in this section work with single worksheets. -The ["Common Spreadsheet Format"](../csf/general) section describes +The ["Common Spreadsheet Format"](/docs/csf/general) section describes the object structure in more detail. `workbook.SheetNames` is an ordered list of the worksheet names. `workbook.Sheets` is an object whose keys are sheet names and whose values are worksheet objects. @@ -585,7 +585,7 @@ var aoa = XLSX.utils.sheet_to_json(worksheet, {...opts, header: 1}); The `sheet_to_json` utility function walks a workbook in row-major order, generating an array of objects. The second `opts` argument controls a number of export decisions including the type of values (JS values or formatted text). The -["JSON"](../api/utilities#json) section describes the argument in more detail. +["JSON"](/docs/api/utilities#json) section describes the argument in more detail. By default, `sheet_to_json` scans the first row and uses the values as headers. With the `header: 1` option, the function exports an array of arrays of values. @@ -599,7 +599,7 @@ With the `header: 1` option, the function exports an array of arrays of values. [`x-spreadsheet`](https://github.com/myliang/x-spreadsheet) is an interactive data grid for previewing and modifying structured data in the web browser. The -[demo](../demos/grid#x-spreadsheet) includes a sample script and live demo. +[demo](/docs/demos/grid#x-spreadsheet) includes a sample script and live demo. </TabItem> <TabItem value="react" label="React"> @@ -643,20 +643,20 @@ export default function App() { <TabItem value="vue" label="VueJS"> [`vue3-table-lite`](https://vue3-lite-table.vercel.app/) is a simple VueJS 3 -data table. It is featured in the [dedicated demo](../demos/grid#vue3-table-lite). +data table. It is featured in the [dedicated demo](/docs/demos/grid#vue3-table-lite). </TabItem> </Tabs> ### Example: Data Loading -["Typed Arrays and ML"](../demos/ml) covers strategies for +["Typed Arrays and ML"](/docs/demos/ml) covers strategies for generating typed arrays and tensors from worksheet data. <details> <summary><b>Populating a database (SQL or no-SQL)</b> (click to show)</summary> -The [`database` demo](../demos/database/) includes examples of working with databases and query results. +The [`database` demo](/docs/demos/database/) includes examples of working with databases and query results. </details> @@ -752,7 +752,7 @@ function Tabeller(props) { } ``` -The [`react` demo](../demos/react) includes more React examples. +The [`react` demo](/docs/demos/react) includes more React examples. </TabItem> <TabItem value="vue" label="VueJS"> @@ -786,7 +786,7 @@ const S5SComponent = { }; ``` -The [`vuejs` demo](../demos/vue) includes more React examples. +The [`vuejs` demo](/docs/demos/vue) includes more React examples. </TabItem> </Tabs> @@ -804,7 +804,7 @@ var csv = XLSX.utils.sheet_to_csv(worksheet, opts); ``` This snapshot is designed to replicate the "CSV UTF-8 (`.csv`)" output type. -["Delimiter-Separated Output"](../api/utilities#delimiter-separated-output) describes the +["Delimiter-Separated Output"](/docs/api/utilities#delimiter-separated-output) describes the function and the optional `opts` argument in more detail. _Generate "Text" from a single worksheet_ @@ -814,7 +814,7 @@ var txt = XLSX.utils.sheet_to_txt(worksheet, opts); ``` This snapshot is designed to replicate the "UTF-16 Text (`.txt`)" output type. -["Delimiter-Separated Output"](../api/utilities#delimiter-separated-output) describes the +["Delimiter-Separated Output"](/docs/api/utilities#delimiter-separated-output) describes the function and the optional `opts` argument in more detail. _Generate a list of formulae from a single worksheet_ @@ -828,7 +828,7 @@ Array formulae are rendered in the form `range=formula` while plain cells are rendered in the form `cell=formula or value`. String literals are prefixed with an apostrophe `'`, consistent with Excel's formula bar display. -["Formulae Output"](../api/utilities#formulae-output) describes the function in more detail. +["Formulae Output"](/docs/api/utilities#formulae-output) describes the function in more detail. ## Streaming Write diff --git a/docz/docs/07-csf/02-cell.md b/docz/docs/07-csf/02-cell.md index 081c2c1..2ebf8a5 100644 --- a/docz/docs/07-csf/02-cell.md +++ b/docz/docs/07-csf/02-cell.md @@ -11,16 +11,16 @@ Cell objects are plain JS objects with keys and values following the convention: | | **Core Cell Properties** ([More Info](#data-types)) | | `v` | raw value (number, string, Date object, boolean) | | `t` | type: `b` Boolean, `e` Error, `n` Number, `d` Date, `s` Text, `z` Stub | -| | **Number Formats** ([More Info](./features#number-formats)) | +| | **Number Formats** ([More Info](/docs/csf/features#number-formats)) | | `z` | number format string associated with the cell (if requested) | | `w` | formatted text (if applicable) | -| | **Formulae** ([More Info](./features/formulae)) | +| | **Formulae** ([More Info](/docs/csf/features/formulae)) | | `f` | cell formula encoded as an A1-Style string (if applicable) | | `F` | range of enclosing array if formula is array formula (if applicable) | | `D` | if true, array formula is dynamic (if applicable) | -| | **Other Cell Properties** ([More Info](./features)) | -| `l` | cell hyperlink and tooltip ([More Info](./features/hyperlinks)) | -| `c` | cell comments ([More Info](./features/comments)) | +| | **Other Cell Properties** ([More Info](/docs/csf/features)) | +| `l` | cell hyperlink / tooltip ([More Info](/docs/csf/features/hyperlinks)) | +| `c` | cell comments ([More Info](/docs/csf/features/comments)) | | `r` | rich text encoding (if applicable) | | `h` | HTML rendering of the rich text (if applicable) | | `s` | the style/theme of the cell (if applicable) | @@ -76,7 +76,7 @@ store ISO 8601 Date strings like you would get from `date.toISOString()`. On the other hand, writers and exporters should be able to handle date strings and JS Date objects. Note that Excel disregards timezone modifiers and treats all dates in the local timezone. The library does not correct for this error. -Dates are covered in more detail [in the Dates section](./features/dates) +Dates are covered in more detail [in the Dates section](/docs/csf/features/dates) Type `s` is the String type. Values are explicitly stored as text. Excel will interpret these cells as "number stored as text". Generated Excel files diff --git a/docz/docs/07-csf/04-book.md b/docz/docs/07-csf/04-book.md index 0bad16b..01bf211 100644 --- a/docz/docs/07-csf/04-book.md +++ b/docz/docs/07-csf/04-book.md @@ -104,8 +104,8 @@ may not enforce this constraint. `wb.Workbook.WBProps` holds other workbook properties: -| Key | Description | -|:----------------|:----------------------------------------------------| -| `CodeName` | [VBA Workbook Code Name](./features#vba-and-macros) | -| `date1904` | epoch: 0/false for 1900 system, 1/true for 1904 | -| `filterPrivacy` | Warn or strip personally identifying info on save | +| Key | Description | +|:----------------|:-----------------------------------------------------------| +| `CodeName` | [VBA Workbook Name](/docs/csf/features#vba-and-macros) | +| `date1904` | epoch: 0/false for 1900 system, 1/true for 1904 | +| `filterPrivacy` | Warn or strip personally identifying info on save | diff --git a/docz/docs/07-csf/07-features/01-formulae.md b/docz/docs/07-csf/07-features/01-formulae.md index 4a3952d..a50d5dd 100644 --- a/docz/docs/07-csf/07-features/01-formulae.md +++ b/docz/docs/07-csf/07-features/01-formulae.md @@ -131,7 +131,7 @@ The A1-Style formula string is stored in the `f` field of the cell object. Spreadsheet software typically represent formulae with a leading `=` sign, but SheetJS formulae omit the `=`. -["A1-Style"](../general#a1-style) describes A1-Style in more detail. +["A1-Style"](/docs/csf/general#a1-style) describes A1-Style in more detail. <details open><summary><b>Live Example</b> (click to hide)</summary> diff --git a/docz/docs/08-api/07-write-options.md b/docz/docs/08-api/07-write-options.md index ef2cb2e..d0db38a 100644 --- a/docz/docs/08-api/07-write-options.md +++ b/docz/docs/08-api/07-write-options.md @@ -45,7 +45,7 @@ The write functions accept an options argument: - `codepage` is applied to legacy formats including DBF. Characters missing from the encoding will be replaced with underscore characters (`_`). - `Props` is an object mirroring the workbook `Props` field. See the table from - the [Workbook File Properties](../csf/book#file-properties) section. + the [Workbook File Properties](/docs/csf/book#file-properties) section. - if specified, the string from `themeXLSX` will be saved as the primary theme for XLSX/XLSB/XLSM files (to `xl/theme/theme1.xml` in the ZIP) - Due to a bug in the program, some features like "Text to Columns" will crash diff --git a/docz/docs/08-api/09-utilities.md b/docz/docs/08-api/09-utilities.md index 15b76ee..3ff74fa 100644 --- a/docz/docs/08-api/09-utilities.md +++ b/docz/docs/08-api/09-utilities.md @@ -436,9 +436,9 @@ can be added to the individual TD elements: | Attribute | Description | |:----------|:----------------------------------------------------------| -| `data-t` | Override [Cell Type](../csf/cell#data-types) | +| `data-t` | Override [Cell Type](/docs/csf/cell#data-types) | | `data-v` | Override Cell Value | -| `data-z` | Override [Number Format](../csf/features/#number-formats) | +| `data-z` | Override [Number Format](/docs/csf/features/#number-formats) | For example: diff --git a/docz/docs/08-api/index.md b/docz/docs/08-api/index.md index 25c09de..4b110cd 100644 --- a/docz/docs/08-api/index.md +++ b/docz/docs/08-api/index.md @@ -20,7 +20,7 @@ title: API Reference `XLSX.readFile(filename, read_opts)` attempts to read `filename` and parse. -Parse options are described in the [Parsing Options](./parse-options) section. +Parse options are described in the [Parsing Options](/docs/api/parse-options) section. ## Writing functions @@ -36,13 +36,13 @@ In browser-based environments, it will attempt to force a client-side download. `XLSX.writeFileAsync(filename, wb, o, cb)` attempts to write `wb` to `filename`. If `o` is omitted, the writer will use the third argument as the callback. -Write options are described in the [Writing Options](./write-options) section. +Write options are described in the [Writing Options](/docs/api/write-options) section. ## Utilities Utilities are available in the `XLSX.utils` object. -The following are described in [`A1` Utilities](../csf/general#utilities) +The following are described in [`A1` Utilities](/docs/csf/general#utilities) **Cell and cell address manipulation:** @@ -51,7 +51,7 @@ The following are described in [`A1` Utilities](../csf/general#utilities) - `encode_cell / decode_cell` converts cell addresses. - `encode_range / decode_range` converts cell ranges. -The following are described in the [Utility Functions](./utilities): +The following are described in the [Utility Functions](/docs/api/utilities): **Constructing:** diff --git a/docz/docs/09-miscellany/01-formats.md b/docz/docs/09-miscellany/01-formats.md index 0b4a586..ad8539e 100644 --- a/docz/docs/09-miscellany/01-formats.md +++ b/docz/docs/09-miscellany/01-formats.md @@ -5,9 +5,9 @@ hide_table_of_contents: true # File Formats - + - + | Format | Read | Write | diff --git a/docz/docs/09-miscellany/02-errors.md b/docz/docs/09-miscellany/02-errors.md index 279af11..c268023 100644 --- a/docz/docs/09-miscellany/02-errors.md +++ b/docz/docs/09-miscellany/02-errors.md @@ -10,7 +10,7 @@ wealth of information and user-contributed examples. **Many of these errors have been fixed in newer releases!** Ensure that the latest version of the library is being used. Some legacy endpoints are out of -date. [Review the Installation instructions.](../getting-started#installation) +date. [Review the Installation instructions.](/docs/getting-started#installation) If issues are not covered in the docs or the issue tracker, or if a solution is not discussed in the documentation, we would appreciate a bug report. @@ -42,7 +42,7 @@ should be used. </details> -The API functions support [dense mode](../csf/sheet#dense-mode): +The API functions support [dense mode](/docs/csf/sheet#dense-mode): ```js var wb = XLSX.read(data, {dense: true}); // creates a dense-mode sheet @@ -61,7 +61,7 @@ IE10 does not properly support `Transferable`. #### Object doesn't support property or method 'slice' IE does not implement `Uint8Array#slice`. An implementation is included in the -shim script. Check [the "Standalone" Installation note](../getting-started/installation/standalone#internet-explorer-and-older-browsers) +shim script. Check [the "Standalone" Installation note](/docs/getting-started/installation/standalone#internet-explorer-and-older-browsers) #### TypeError: f.substr is not a function @@ -78,7 +78,7 @@ var wb = XLSX.read(b64.replace(/_/g, "/").replace(/-/g, "+"), {type:'base64'}); other binary spreadsheet files. Applications should use `FileReader#readAsArrayBuffer` or `Blob#arrayBuffer`. -Examples are included [in "User Submissions"](../06-solutions/01-input.md#example-user-submissions) +Examples are included [in "User Submissions"](/docs/solutions/input#example-user-submissions) Applications specifically targeting legacy browsers like IE10 should use `FileReader#readAsBinaryString` to read the data and call `XLSX.read` using the @@ -127,7 +127,7 @@ document.getElementById('file-object').addEventListener("change", function(e) { #### Browser is stuck! By default, operations run in the main renderer context and block the browser -from updating. [Web Workers](../demos/worker) offload the hard work to separate +from updating. [Web Workers](/docs/demos/worker) offload the hard work to separate contexts, freeing up the renderer to update. #### Strange exported file names in the web browser @@ -178,7 +178,7 @@ XLSX.writeFile(workbook, "export.xlsx", { compression: true }); #### CSV and XLS files with Chinese or Japanese characters look garbled The ESM build, used in tools like Webpack and in Deno, does not include the -codepage tables by default. The ["Frameworks and Bundlers"](../02-getting-started/01-installation/02-frameworks.md#encoding-support) +codepage tables by default. The ["Frameworks and Bundlers"](/docs/getting-started/installation/frameworks#encoding-support) section explains how to load support. #### DBF files with Chinese or Japanese characters have underscores diff --git a/docz/docs/index.md b/docz/docs/index.md index dbdae86..9acb3f1 100644 --- a/docz/docs/index.md +++ b/docz/docs/index.md @@ -65,7 +65,7 @@ document.getElementById("sheetjsexport").addEventListener('click', function() { <details><summary><b>How to automate with NodeJS</b> (click to show)</summary> -[The "Headless Automation" demo](./demos/headless) includes complete examples +[The "Headless Automation" demo](/docs/demos/headless) includes complete examples using the `puppeteer` and `playwright` browser automation frameworks. </details> @@ -241,6 +241,6 @@ This,is,a,Test ### Supported File Formats - + - + diff --git a/docz/docs/02-getting-started/img/final.png b/docz/static/example/final.png similarity index 100% rename from docz/docs/02-getting-started/img/final.png rename to docz/static/example/final.png diff --git a/docz/docs/02-getting-started/img/rough.png b/docz/static/example/rough.png similarity index 100% rename from docz/docs/02-getting-started/img/rough.png rename to docz/static/example/rough.png diff --git a/docz/docs/img/formats.png b/docz/static/formats.png similarity index 100% rename from docz/docs/img/formats.png rename to docz/static/formats.png diff --git a/docz/docs/img/tools.svg b/docz/static/img/tools2.svg similarity index 100% rename from docz/docs/img/tools.svg rename to docz/static/img/tools2.svg diff --git a/docz/docs/img/legend.png b/docz/static/legend.png similarity index 100% rename from docz/docs/img/legend.png rename to docz/static/legend.png