more workarounds for MDX breaking changes

This commit is contained in:
SheetJS 2024-04-12 03:11:07 -04:00
parent 0fda6d46ab
commit c3741aaf05
32 changed files with 188 additions and 103 deletions

View File

@ -67,6 +67,20 @@ This is no longer valid in MDX v2. Autolinks should be used:
Scripts are available at https://cdn.sheetjs.com
```
**Variables**
Patterns such as
```
<a href={`Foo${current}`}>Foo{current}</a>
```
do not work in MDX v2. Instead, string literals and concatenation must be used:
```
<a href={"Foo" + current + ""}>{"Foo" + current + ""}</a>
```
</details>

View File

@ -1,4 +1,5 @@
---
title: Standalone Browser Scripts
pagination_prev: getting-started/index
pagination_next: getting-started/examples/index
sidebar_position: 1
@ -9,8 +10,6 @@ sidebar_custom_props:
import current from '/version.js';
import CodeBlock from '@theme/CodeBlock';
# Standalone Browser Scripts
Each standalone release script is available at https://cdn.sheetjs.com/.
<p>The current version is {current} and can be referenced as follows:</p>
@ -40,7 +39,7 @@ syncing issues, they are generally out of date.
## Browser Scripts
`xlsx.full.min.js` is the complete standalone script. It includes support for
`xlsx.full.min.js` is the complete standalone script. It includes support for
reading and writing many spreadsheet formats.
<CodeBlock language="html">{`\
@ -48,11 +47,11 @@ reading and writing many spreadsheet formats.
<script lang="javascript" src="https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js"></script>`}
</CodeBlock>
`xlsx.mini.min.js` is a slimmer build that omits the following features:
A slimmer build is generated at `dist/xlsx.mini.min.js`. Compared to full build:
- codepage library skipped (no support for XLS encodings)
- no support for XLSB / XLS / Lotus 1-2-3 / SpreadsheetML 2003 / Numbers
- node stream utils removed
- CSV and SYLK encodings (directly affecting users outside of the United States)
- XLSB / XLS / Lotus 1-2-3 / SpreadsheetML 2003 / Numbers file formats
- Stream utility functions
<details>
<summary><b>How to integrate the mini build</b> (click to show)</summary>
@ -69,10 +68,11 @@ scratch, a single script tag should be added at the top of the HTML page:
### Vendoring
For general stability, "vendoring" scripts is the recommended approach:
For general stability, making a local copy of SheetJS scripts ("vendoring") is
strongly recommended. Vendoring decouples websites from SheetJS infrastructure.
<p>1) Download the script (<code parentName="pre">xlsx.full.min.js</code>) for
the desired version. The current version is available at <a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>https://cdn.sheetjs.com/xlsx-{current}/package/dist/xlsx.full.min.js</a></p>
<ol start="1"><li><p>Download the script (<code parentName="pre">xlsx.full.min.js</code>) for
the desired version. The current version is available at <a href={"https://cdn.sheetjs.com/xlsx-" + current + "/package/dist/xlsx.full.min.js"}>{"https://cdn.sheetjs.com/xlsx-" + current + "/package/dist/xlsx.full.min.js"}</a></p></li></ol>
2) Move the script to a `public` folder with other scripts.
@ -95,11 +95,11 @@ use the CDN scripts directly. They should be downloaded and saved to a public
directory in the site:
<ul>
<li>Standalone: <a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.mini.min.js`}>https://cdn.sheetjs.com/xlsx-{current}/package/dist/xlsx.mini.min.js</a></li>
<li>Shim: <a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/shim.min.js`}>https://cdn.sheetjs.com/xlsx-{current}/package/dist/shim.min.js</a></li>
<li>Standalone: <a href={"https://cdn.sheetjs.com/xlsx-" + current + "/package/dist/xlsx.mini.min.js"}>{"https://cdn.sheetjs.com/xlsx-" + current + "/package/dist/xlsx.mini.min.js"}</a></li>
<li>Shim: <a href={"https://cdn.sheetjs.com/xlsx-" + current + "/package/dist/shim.min.js"}>{"https://cdn.sheetjs.com/xlsx-" + current + "/package/dist/shim.min.js"}</a></li>
</ul>
Add a `script` reference to the shim before the standalone script:
A `script` reference to the shim must be added before the standalone script:
```html
<!-- add the shim first -->
@ -123,9 +123,11 @@ importScripts("https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.mi
:::caution pass
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 "Frameworks and Bundlers"](/docs/getting-started/installation/frameworks).
This section refers to imports in HTML pages using `script type="module"`.
The ["Frameworks and Bundlers"](/docs/getting-started/installation/frameworks)
section covers imports in projects using bundlers (ViteJS) or frameworks
(Kaioken / ReactJS / Angular / VueJS / Svelte)
:::
@ -210,8 +212,7 @@ Bower is deprecated and the maintainers recommend using other tools.
:::
The Bower package manager plays nice with the CDN tarballs:
The Bower package manager supports tarballs from the SheetJS CDN:
<CodeBlock language="bash">{`\
npx bower install https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}

View File

@ -1,9 +1,10 @@
---
title: Frameworks and Bundlers
pagination_prev: getting-started/index
pagination_next: getting-started/examples/index
sidebar_position: 2
sidebar_custom_props:
summary: Angular, React, VueJS, Webpack, etc.
summary: Kaioken, Angular, React, VueJS, ViteJS, Webpack, etc.
---
import current from '/version.js';
@ -11,13 +12,11 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import CodeBlock from '@theme/CodeBlock';
# Frameworks and Bundlers
Each standalone release package is available at https://cdn.sheetjs.com/. The
NodeJS package is designed to be used with frameworks and bundlers. It is a
NodeJS package is designed to be used with frameworks and bundlers. It is a
proper ECMAScript Module release which can be optimized with developer tools.
<p><a href={`https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}>https://cdn.sheetjs.com/xlsx-{current}/xlsx-{current}.tgz</a> is the URL for version {current}</p>
<p><a href={"https://cdn.sheetjs.com/xlsx-" + current + "/xlsx-" + current + ".tgz"}>{"https://cdn.sheetjs.com/xlsx-" + current + "/xlsx-" + current + ".tgz"}</a> is the URL for version {current}</p>
## Installation
@ -131,7 +130,8 @@ in `package.json` can control module resolution:
### Vendoring
For general stability, "vendoring" modules is the recommended approach:
For general stability, making a local copy of SheetJS modules ("vendoring") is
strongly recommended. Vendoring decouples projects from SheetJS infrastructure.
0) Remove any existing dependency on a project named `xlsx`:
@ -153,8 +153,8 @@ yarn remove xlsx`}
</TabItem>
</Tabs>
<p>1) Download the tarball (<code parentName="pre">xlsx-{current}.tgz</code>) for the desired version. The current
version is available at <a href={`https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}>https://cdn.sheetjs.com/xlsx-{current}/xlsx-{current}.tgz</a></p>
<ol start="1"><li><p>Download the tarball (<code parentName="pre">xlsx-{current}.tgz</code>) for the desired version. The current
version is available at <a href={"https://cdn.sheetjs.com/xlsx-" + current + "/xlsx-" + current + ".tgz"}>{"https://cdn.sheetjs.com/xlsx-" + current + "/xlsx-" + current + ".tgz"}</a></p></li></ol>
2) Create a `vendor` subfolder at the root of your project and move the tarball
to that folder. Add it to your project repository.

View File

@ -14,7 +14,7 @@ import CodeBlock from '@theme/CodeBlock';
Package tarballs are available on https://cdn.sheetjs.com.
<p><a href={`https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}>https://cdn.sheetjs.com/xlsx-{current}/xlsx-{current}.tgz</a> is the URL for version {current}</p>
<p><a href={"https://cdn.sheetjs.com/xlsx-" + current + "/xlsx-" + current + ".tgz"}>{"https://cdn.sheetjs.com/xlsx-" + current + "/xlsx-" + current + ".tgz"}</a> is the URL for version {current}</p>
## Installation
@ -120,7 +120,8 @@ in `package.json` can control module resolution:
### Vendoring
For general stability, "vendoring" modules is the recommended approach:
For general stability, making a local copy of SheetJS modules ("vendoring") is
strongly recommended. Vendoring decouples projects from SheetJS infrastructure.
0) Remove any existing dependency on a project named `xlsx`:
@ -142,8 +143,7 @@ yarn remove xlsx`}
</TabItem>
</Tabs>
<p>1) Download the tarball (<code parentName="pre">xlsx-{current}.tgz</code>) for the desired version. The current
version is available at <a href={`https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}>https://cdn.sheetjs.com/xlsx-{current}/xlsx-{current}.tgz</a></p>
<ol start="1"><li><p>Download the tarball (<code parentName="pre">xlsx-{current}.tgz</code>) for the desired version. The current version is available at <a href={"https://cdn.sheetjs.com/xlsx-" + current + "/xlsx-" + current + ".tgz"}>{"https://cdn.sheetjs.com/xlsx-" + current + "/xlsx-" + current + ".tgz"}</a></p></li></ol>
2) Create a `vendor` subfolder at the root of your project and move the tarball
to that folder. Add it to your project repository.

View File

@ -1,4 +1,5 @@
---
title: AMD (define)
pagination_prev: getting-started/index
pagination_next: getting-started/examples/index
sidebar_position: 4
@ -9,13 +10,11 @@ sidebar_custom_props:
import current from '/version.js';
import CodeBlock from '@theme/CodeBlock';
# AMD (define)
Each standalone release script is available at https://cdn.sheetjs.com/.
`xlsx.full.min.js` supports AMD with name `xlsx` out of the box.
<p><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>https://cdn.sheetjs.com/xlsx-{current}/package/dist/xlsx.full.min.js</a> is the URL for {current}</p>
<p><a href={"https://cdn.sheetjs.com/xlsx-" + current + "/package/dist/xlsx.full.min.js"}>{"https://cdn.sheetjs.com/xlsx-" + current + "/package/dist/xlsx.full.min.js"}</a> is the URL for {current}</p>
:::note pass
@ -65,6 +64,65 @@ define(['N/file', 'xlsx'], function(file, XLSX) {
**More details are included in the [NetSuite demo](/docs/demos/cloud/netsuite#installation)**
:::caution Oracle Bugs
[NetSuite users reported](https://git.sheetjs.com/sheetjs/sheetjs/issues/3097)
errors that stem from an Oracle issue. A sample error message is shown below.
```
Fail to evaluate script: com.netsuite.suitescript.scriptobject.GraalValueAdapter@68d0f09d
```
**This is a NetSuite bug. Only Oracle can fix the bug!**
It is strongly encouraged to escalate the issue with Oracle support.
NetSuite users have reported success with the following workaround:
1) Open the script in a text editor and search for `define(` in the code.
There will be exactly one instance:
```js
define("xlsx",function(){
```
Replace the `xlsx` with `sheetjs`:
```js
define("sheetjs",function(){
```
2) Use the new name in the JSON configuration:
```json title="JsLibraryConfig.json"
{
"paths": {
// highlight-next-line
"sheetjs": "/path/to/xlsx.full.min"
}
}
```
3) Use the new name in the array argument to the `define` function call:
```js title="SuiteScript"
/**
* @NApiVersion 2.x
* ... more options ...
// highlight-next-line
* @NAmdConfig ./JsLibraryConfig.json
*/
// highlight-next-line
define(['N/file', 'sheetjs'], function(file, XLSX) {
// ^^^^^^^ ^^^^
// new module name same variable
// ... use XLSX here ...
});
```
:::
## SAP UI5
After downloading the script, it can be uploaded to the UI5 project and loaded

View File

@ -1,4 +1,5 @@
---
title: ExtendScript
pagination_prev: getting-started/index
pagination_next: getting-started/examples/index
sidebar_position: 5
@ -8,13 +9,15 @@ sidebar_custom_props:
import current from '/version.js';
# ExtendScript
ExtendScript is a dialect of JavaScript used in Photoshop and InDesign scripts.
Each standalone release script is available at https://cdn.sheetjs.com/.
`xlsx.extendscript.js` is an ExtendScript build for Photoshop and InDesign.
`xlsx.extendscript.js` is a special ExtendScript-compatible build. The script is
carefully assembled to work around ExtendScript quirks. Due to bugs in various
JavaScript minifiers and tools, scripts cannot be compressed or post-processed.
<p><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.extendscript.js`}>https://cdn.sheetjs.com/xlsx-{current}/package/dist/xlsx.extendscript.js</a> is the URL for {current}</p>
<p><a href={"https://cdn.sheetjs.com/xlsx-" + current + "/package/dist/xlsx.extendscript.js"}>{"https://cdn.sheetjs.com/xlsx-" + current + "/package/dist/xlsx.extendscript.js"}</a> is the URL for {current}</p>
After downloading the script, it can be directly referenced with `#include`:

View File

@ -1,4 +1,5 @@
---
title: Deno
pagination_prev: getting-started/index
pagination_next: getting-started/examples/index
sidebar_position: 6
@ -11,7 +12,7 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import CodeBlock from '@theme/CodeBlock';
# Deno
Deno is a JavaScript runtime that can import scripts from URLs.
Module scripts and type definitions are available at https://cdn.sheetjs.com/.
@ -22,7 +23,8 @@ Using the URL imports, `deno run` will automatically download scripts and types:
import * as XLSX from 'https://cdn.sheetjs.com/xlsx-${current}/package/xlsx.mjs';`}
</CodeBlock>
The `@deno-types` comment instructs Deno to use the type definitions.
The module URL is the ECMAScript Module build on the SheetJS CDN. `@deno-types`
instructs Deno to use the type definitions from the SheetJS CDN.
:::caution Deno support is considered experimental.

View File

@ -14,7 +14,7 @@ import CodeBlock from '@theme/CodeBlock';
Package tarballs are available on https://cdn.sheetjs.com.
<p><a href={`https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}>https://cdn.sheetjs.com/xlsx-{current}/xlsx-{current}.tgz</a> is the URL for version {current}</p>
<p><a href={"https://cdn.sheetjs.com/xlsx-" + current + "/xlsx-" + current + ".tgz"}>{"https://cdn.sheetjs.com/xlsx-" + current + "/xlsx-" + current + ".tgz"}</a> is the URL for version {current}</p>
:::caution Bun support is considered experimental.
@ -50,8 +50,7 @@ For general stability, "vendoring" modules is the recommended approach:
bun rm xlsx
```
<p>1) Download the tarball (<code parentName="pre">xlsx-{current}.tgz</code>) for the desired version. The current
version is available at <a href={`https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}>https://cdn.sheetjs.com/xlsx-{current}/xlsx-{current}.tgz</a></p>
<ol start="1"><li><p>Download the tarball (<code parentName="pre">xlsx-{current}.tgz</code>) for the desired version. The current version is available at <a href={"https://cdn.sheetjs.com/xlsx-" + current + "/xlsx-" + current + ".tgz"}>{"https://cdn.sheetjs.com/xlsx-" + current + "/xlsx-" + current + ".tgz"}</a></p></li></ol>
2) Create a `vendor` subfolder at the root of your project and move the tarball
to that folder. Add it to your project repository.
@ -135,7 +134,7 @@ cd sheetjs-bun-dle
echo "{}" > package.json
```
1) Install the library:
1) Install the SheetJS package tarball:
<CodeBlock language="bash">{`\
bun install https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}

View File

@ -1,4 +1,5 @@
---
title: Import Tutorial
pagination_prev: getting-started/installation/index
pagination_next: getting-started/roadmap
sidebar_position: 4
@ -9,8 +10,6 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import CodeBlock from '@theme/CodeBlock';
# Import Tutorial
Many government agencies distribute official data and statistics in workbooks.
SheetJS libraries help translate these files to useful information.

View File

@ -1,12 +1,11 @@
---
title: Tutorials
pagination_prev: getting-started/installation/index
pagination_next: getting-started/roadmap
---
# Tutorials
SheetJS presents a simple JS interface that works with "Array of Arrays" and
"Array of JS Objects". The API functions are building blocks that should be
"Array of JS Objects". The API functions are building blocks that should be
combined with other JS APIs to solve problems.
These discussions focus on the problem solving mindset. API details are covered

View File

@ -1,10 +1,9 @@
---
title: Roadmap
pagination_prev: getting-started/examples/index
sidebar_position: 3
---
# Roadmap
Most scenarios involving spreadsheets and data can be divided into 5 parts:
1) **Acquire Data**: Data may be stored anywhere: local or remote files,

View File

@ -1,10 +1,9 @@
---
title: Zen of SheetJS
sidebar_position: 4
hide_table_of_contents: true
---
# Zen of SheetJS
SheetJS design and development is guided by a few key principles.
### Data processing should fit in any workflow

View File

@ -1,4 +1,5 @@
---
title: Getting Started
hide_table_of_contents: true
pagination_next: getting-started/installation/index
---
@ -6,8 +7,6 @@ pagination_next: getting-started/installation/index
import DocCardList from '@theme/DocCardList';
import {useCurrentSidebarCategory} from '@docusaurus/theme-common';
# Getting Started
["Export Tutorial"](/docs/getting-started/examples/export) is a live example
that covers general data munging and data export to spreadsheets.

View File

@ -1,5 +1,5 @@
---
title: React Native
title: Sheets on the Go with React Native
sidebar_label: React Native
description: Build data-intensive mobile apps with React Native. Seamlessly integrate spreadsheets into your app using SheetJS. Securely process and generate Excel files in the field.
pagination_prev: demos/static/index
@ -9,8 +9,6 @@ sidebar_custom_props:
summary: React + Native Rendering
---
# Sheets on the Go with React Native
import current from '/version.js';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

View File

@ -9,8 +9,6 @@ sidebar_custom_props:
summary: Webview + Rust Backend
---
# Data Wrangling in Tauri Apps
import current from '/version.js';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

View File

@ -499,7 +499,7 @@ The app will display the "SheetForce demo" text from the component template:
### Add SheetJS
<p>16) Download <a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`}>https://cdn.sheetjs.com/xlsx-{current}/package/dist/xlsx.full.min.js</a></p>
<ol start="16"><li><p>Download <a href={"https://cdn.sheetjs.com/xlsx-" + current + "/package/dist/xlsx.full.min.js"}>{"https://cdn.sheetjs.com/xlsx-" + current + "/package/dist/xlsx.full.min.js"}</a></p></li></ol>
:::warning pass

View File

@ -428,8 +428,8 @@ program drop cleanfile
clear
```
<p>19) In the result of Step 16, click the link on <code><span {...b}>import
excel "sheetjs.tmp.xlsx", firstrow</span></code></p>
<ol start="19"><li><p>In the result of Step 16, click the link on <code><span {...b}>import
excel "sheetjs.tmp.xlsx", firstrow</span></code></p></li></ol>
Alternatively, manually type the command:

View File

@ -1,11 +1,10 @@
---
title: Demos
pagination_prev: getting-started/index
pagination_next: solutions/input
hide_table_of_contents: true
---
# Demos
Demos include complete examples and short discussions. For features that can
run in the web browser, demos will include interactive examples.
@ -29,8 +28,9 @@ in the [issue tracker](https://git.sheetjs.com/sheetjs/docs.sheetjs.com/issues)
### Web Frameworks
- [`Kaioken`](/docs/demos/frontend/kaioken)
- [`Angular`](/docs/demos/frontend/angular)
- [`React`](/docs/demos/frontend/react)
- [`ReactJS`](/docs/demos/frontend/react)
- [`Svelte`](/docs/demos/frontend/svelte)
- [`VueJS`](/docs/demos/frontend/vue)
- [`AngularJS`](/docs/demos/frontend/angularjs)
@ -132,12 +132,13 @@ in the [issue tracker](https://git.sheetjs.com/sheetjs/docs.sheetjs.com/issues)
- [`JavaScript Engines`](/docs/demos/engines)
- [`V8 (C++ / Rust)`](/docs/demos/engines/v8)
- [`Duktape (C / Perl)`](/docs/demos/engines/duktape)
- [`Duktape (C / Perl / Python / Zig)`](/docs/demos/engines/duktape)
- [`JavaScriptCore (Swift)`](/docs/demos/engines/jsc)
- [`Rhino (Java)`](/docs/demos/engines/rhino)
- [`Nashorn (Java)`](/docs/demos/engines/nashorn)
- [`Goja (Go)`](/docs/demos/engines/goja)
- [`ChakraCore (C++)`](/docs/demos/engines/chakra)
- [`QuickJS (C)`](/docs/demos/engines/quickjs)
- [`Jint (C# / .NET)`](/docs/demos/engines/jint)
- [`ExecJS (Ruby)`](/docs/demos/engines/rb)
- [`JavaScript::Engine (Perl)`](/docs/demos/engines/perl)

View File

@ -1,10 +1,9 @@
---
title: Data Import
sidebar_position: 1
pagination_prev: demos/index
---
# Data Import
import current from '/version.js';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

View File

@ -1,9 +1,8 @@
---
title: Data Processing
sidebar_position: 3
---
# Data Processing
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.

View File

@ -1,14 +1,20 @@
---
title: Data Export
sidebar_position: 5
---
# Data Export
import current from '/version.js';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import CodeBlock from '@theme/CodeBlock';
:::tip pass
The ["Export Tutorial"](/docs/getting-started/examples/export) is a gentle
introduction to data processing and export.
:::
## Writing Workbooks
### API

View File

@ -1,12 +1,11 @@
---
title: Sheet Objects
sidebar_position: 3
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Sheet Objects
Excel supports 4 different types of "sheets":
- "worksheets": normal sheets
- "chartsheets": full-tab charts

View File

@ -1,8 +1,10 @@
---
title: Workbook Object
sidebar_position: 4
---
# Workbook Object
SheetJS workbook objects represent collections of worksheets and associated
workbook-level metadata.
For a given workbook object `wb`:

View File

@ -1,9 +1,8 @@
---
title: Formulae
sidebar_position: 2
---
# Formulae
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

View File

@ -1,12 +1,17 @@
# Spreadsheet Features
---
title: Spreadsheet Features
---
import DocCardList from '@theme/DocCardList';
import {useCurrentSidebarCategory} from '@docusaurus/theme-common';
Even for basic features like date storage, the official Excel formats store the
same content in different ways. The parsers are expected to convert from the
underlying file format representation to the Common Spreadsheet Format. Writers
are expected to serialize SheetJS workbooks in the underlying file format.
File formats represent data in different ways.
SheetJS parsers are expected to convert from the underlying file format
representation to the Common Spreadsheet Format.
SheetJS writers are expected to convert from the Common Spreadsheet Format to
the relevant file formats.
The following topics are covered in sub-pages:

View File

@ -130,7 +130,7 @@ Adding NUMBERS export support involves two steps:
<Tabs>
<TabItem value="browser" label="Browser">
<p><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.zahl.js`}>https://cdn.sheetjs.com/xlsx-{current}/package/dist/xlsx.zahl.js</a> is the URL for {current}</p>
<p><a href={"https://cdn.sheetjs.com/xlsx-" + current + "/package/dist/xlsx.zahl.js"}>{"https://cdn.sheetjs.com/xlsx-" + current + "/package/dist/xlsx.zahl.js"}</a> is the URL for {current}</p>
<CodeBlock language="html">{`\
<meta charset="utf8">\n\
@ -202,7 +202,7 @@ XLSX.writeFile(wb, "textport.numbers", {numbers: XLSX_ZAHL_PAYLOAD, compression:
</TabItem>
<TabItem value="deno" label="Deno">
<p><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.zahl.mjs`}>https://cdn.sheetjs.com/xlsx-{current}/package/dist/xlsx.zahl.mjs</a> is the URL for {current}</p>
<p><a href={"https://cdn.sheetjs.com/xlsx-" + current + "/package/dist/xlsx.zahl.mjs"}>{"https://cdn.sheetjs.com/xlsx-" + current + "/package/dist/xlsx.zahl.mjs"}</a> is the URL for {current}</p>
<CodeBlock language="ts">{`\
import * as XLSX from 'https://cdn.sheetjs.com/xlsx-${current}/package/xlsx.mjs';\n\

View File

@ -377,7 +377,7 @@ can be added to the individual TD elements:
| Attribute | Description |
|:----------|:-------------------------------------------------------------|
| `data-t` | Override [Cell Type](/docs/csf/cell#data-types) |
| `data-t` | Override [Cell Type](/docs/csf/cell#cell-types) |
| `data-v` | Override Cell Value |
| `data-z` | Override [Number Format](/docs/csf/features/nf) |

View File

@ -1,19 +1,18 @@
---
title: Testing
sidebar_position: 4
hide_table_of_contents: true
---
# Testing
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
<Tabs>
<TabItem value="nodejs" label="NodeJS">
`make test` will run the node-based tests. By default it runs tests on files in
every supported format. To test a specific file type, set `FMTS` to the format
you want to test. Feature-specific tests are available with `make test_misc`
`make test` will run the NodeJS tests. By default it runs tests on files in
every supported format. To test a specific file type, set `FMTS` to the desired
file extension. Feature-specific tests are available with `make test_misc`.
```bash
$ make test_misc # run core tests
@ -105,8 +104,7 @@ env TZ="Asia/Kolkata" WTF=1 make test_misc
### Test Files
Test files are housed in [another repo](https://github.com/SheetJS/test_files).
The test files were hosted on [GitHub](https://github.com/SheetJS/test_files).
Running `make init` will refresh the `test_files` submodule and get the files.
[The "OS-Specific Setup"](/docs/miscellany/contributing#os-specific-setup)
includes notes for installing the required dependencies.
Due to breaking changes in the GitHub infrastructure, the test artifacts are now
distributed in a [ZIP archive](https://test-files.sheetjs.com/test_files.zip)

View File

@ -1,11 +1,13 @@
---
title: Contributing
sidebar_position: 5
---
# Contributing
Due to the precarious nature of the Open Specifications Promise, it is very
important to ensure code is cleanroom. [Contribution Notes](https://git.sheetjs.com/sheetjs/sheetjs/src/branch/master/CONTRIBUTING.md)
important to ensure code is cleanroom.
[The Contribution Notes](https://git.sheetjs.com/sheetjs/sheetjs/src/branch/master/CONTRIBUTING.md)
should be perused before contributing code.
<details>
<summary><b>File organization</b> (click to show)</summary>
@ -20,7 +22,7 @@ Folders:
| `misc` | miscellaneous supporting scripts |
| `modules` | TypeScript source files that generate some of the bits |
| `packages` | Support libraries and tools |
| `test_files` | test files (pulled from the test files repository) |
| `test_files` | test files (pulled from the test artifacts distribution) |
| `tests` | browser tests (run `make ctest` to rebuild) |
| `types` | TypeScript definitions and tests |

View File

@ -1,10 +1,9 @@
---
title: License
sidebar_position: 7
hide_table_of_contents: true
---
# License
SheetJS Community Edition is licensed under the "Apache 2.0 License". All rights
not explicitly granted by the Apache 2.0 License are reserved by SheetJS LLC.
@ -34,6 +33,15 @@ See the License for the specific language governing permissions and
limitations under the License.
```
#### Open Source Disclosure
It is strongly recommended to create a separate page listing all embedded open
source software. The "open source disclosure" should be linked from relevant
pages including Terms of Service (ToS) and End User License Agreement (EULA)
[Office 365](https://web.archive.org/web/20240412032204/https://tasks.office.com/license.html)
includes the short-form attribution in a special license page.
<details>
<summary><b>Complete License Text</b> (click to show)</summary>

View File

@ -1,10 +1,9 @@
---
title: References
sidebar_position: 8
hide_table_of_contents: true
---
# References
Some of our original research is documented at https://oss.sheetjs.com/notes/
The specifications list is non-exhaustive.

View File

@ -87,7 +87,7 @@ const config = {
mermaid: {
options: {
themeVariables: {
edgeLabelBackground: ""
edgeLabelBackground: "transparent"
}
}
},
@ -181,7 +181,7 @@ const config = {
}
})
},
additionalLanguages: [ "visual-basic", "swift", "java", "php", "csharp", "perl", "ruby", "cpp", "applescript", "liquid", "rust", "dart", "wolfram", "matlab", "stata", "zig" ],
additionalLanguages: [ "visual-basic", "swift", "java", "php", "csharp", "perl", "ruby", "cpp", "applescript", "liquid", "rust", "dart", "wolfram", "matlab", "stata", "zig", "diff" ],
},
liveCodeBlock: {
playgroundPosition: 'top'