Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions docs/api/spreadsheet_exportmodulepath_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ exportModulePath?: string;

~~~jsx {2}
const spreadsheet = new dhx.Spreadsheet("spreadsheet", {
exportModulePath: "../libs/json2excel/1.0/worker.js",
exportModulePath: "../libs/json2excel/next/worker.js", // latest version; use x.x instead of next for a specific version
// other config parameters
});
~~~
Expand All @@ -35,10 +35,14 @@ To export files you need to:

- install the **JSON2excel** library
- set the path to the **worker.js** file via the **exportModulePath** option in one of the two ways:
- by providing a local path to the file on your computer, like: `"../libs/json2excel/1.0/worker.js"`
- by providing a link to the file from CDN: `"https://cdn.dhtmlx.com/libs/json2excel/1.0/worker.js"`

By default the link to CDN is used.
- by providing a local path to the file on your computer:
- use `"../libs/json2excel/next/worker.js"` for the latest version
- use `"../libs/json2excel/x.x/worker.js"` for a specific version (replace `x.x` with the actual version from the [GitHub repository](https://github.com/dhtmlx/json2excel))
- by providing a link to the file from CDN:
- use `"https://cdn.dhtmlx.com/libs/json2excel/next/worker.js?vx"` for the latest version
- use `"https://cdn.dhtmlx.com/libs/json2excel/x.x/worker.js?vx"` for a specific version (replace `x.x` with the actual version from the [GitHub repository](https://github.com/dhtmlx/json2excel))

By default, `https://cdn.dhtmlx.com/libs/json2excel/next/worker.js?vx` is used.

**Related articles:** [Data loading and export](loading_data.md#exporting-data)

Expand Down
10 changes: 7 additions & 3 deletions docs/loading_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,16 @@ The library uses the WebAssembly-based library [Json2Excel](https://github.com/d

- install the **JSON2Excel** library
- specify the [](api/spreadsheet_exportmodulepath_config.md) option in the Spreadsheet configuration and set the path to the **worker.js** file in one of the two ways:
- by providing a local path to the file on your computer, like: `"../libs/json2excel/1.0/worker.js"`
- by providing a link to the file from CDN: `"https://cdn.dhtmlx.com/libs/json2excel/1.0/worker.js"`
- by providing a local path to the file on your computer:
- use `"../libs/json2excel/next/worker.js"` for the latest version
- use `"../libs/json2excel/x.x/worker.js"` for a specific version (replace `x.x` with the actual version from the [GitHub repository](https://github.com/dhtmlx/json2excel))
- by providing a link to the file from CDN:
- use `"https://cdn.dhtmlx.com/libs/json2excel/next/worker.js?vx"` for the latest version
- use `"https://cdn.dhtmlx.com/libs/json2excel/x.x/worker.js?vx"` for a specific version (replace `x.x` with the actual version from the [GitHub repository](https://github.com/dhtmlx/json2excel))

~~~jsx
var spreadsheet = new dhx.Spreadsheet(document.body, {
exportModulePath: "../libs/json2excel/1.0/worker.js"
exportModulePath: "../libs/json2excel/next/worker.js" // latest version; use x.x instead of next for a specific version
});
~~~

Expand Down
6 changes: 4 additions & 2 deletions docs/react/props.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,13 @@ Enable sheet tabs with `multiSheets={true}`. Pass `false` to hide the tab bar en
~~~tsx
<ReactSpreadsheet
sheets={sheets}
importModulePath="../libs/excel2json/1.0/worker.js"
exportModulePath="../libs/json2excel/1.0/worker.js"
importModulePath="../libs/excel2json/next/worker.js" // latest version; use x.x instead of next for a specific version
exportModulePath="../libs/json2excel/next/worker.js" // latest version; use x.x instead of next for a specific version
/>
~~~

To use a specific version, replace `next` with the version number (check the [Excel2Json](https://github.com/dhtmlx/excel2json) and [Json2Excel](https://github.com/dhtmlx/json2excel) GitHub repositories).

### European number formatting

~~~tsx
Expand Down