Skip to content

Commit 0c8f90e

Browse files
committed
[update] clarify Json2Excel/Excel2Json export URL options in Spreadsheet docs
- add next (latest) and x.x (specific version) as parallel options with bullet lists - update code examples to use next as default with inline comment for x.x alternative - add default CDN URL (next/worker.js?vx) explicitly in exportModulePath config - add ?vx suffix to all CDN URLs - remove standalone 'Replace x.x' sentences, fold version note into descriptions - update react/props.md example and note for both importModulePath and exportModulePath
1 parent b38899c commit 0c8f90e

3 files changed

Lines changed: 19 additions & 15 deletions

File tree

‎docs/api/spreadsheet_exportmodulepath_config.md‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ exportModulePath?: string;
2020

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

3636
- install the **JSON2excel** library
3737
- set the path to the **worker.js** file via the **exportModulePath** option in one of the two ways:
38-
- by providing a local path to the file on your computer, like: `"../libs/json2excel/x.x/worker.js"`
39-
- by providing a link to the file from CDN: `"https://cdn.dhtmlx.com/libs/json2excel/x.x/worker.js"`
40-
41-
Replace `x.x` with the actual version number (check the [GitHub repository](https://github.com/dhtmlx/json2excel)).
42-
43-
By default the link to CDN is used.
38+
- by providing a local path to the file on your computer:
39+
- use `"../libs/json2excel/next/worker.js"` for the latest version
40+
- 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))
41+
- by providing a link to the file from CDN:
42+
- use `"https://cdn.dhtmlx.com/libs/json2excel/next/worker.js?vx"` for the latest version
43+
- 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))
44+
45+
By default, `https://cdn.dhtmlx.com/libs/json2excel/next/worker.js?vx` is used.
4446

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

‎docs/loading_data.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,16 @@ The library uses the WebAssembly-based library [Json2Excel](https://github.com/d
306306

307307
- install the **JSON2Excel** library
308308
- 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:
309-
- by providing a local path to the file on your computer, like: `"../libs/json2excel/x.x/worker.js"`
310-
- by providing a link to the file from CDN: `"https://cdn.dhtmlx.com/libs/json2excel/x.x/worker.js"`
311-
312-
Replace `x.x` with the actual version number (check the [GitHub repository](https://github.com/dhtmlx/json2excel)).
309+
- by providing a local path to the file on your computer:
310+
- use `"../libs/json2excel/next/worker.js"` for the latest version
311+
- 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))
312+
- by providing a link to the file from CDN:
313+
- use `"https://cdn.dhtmlx.com/libs/json2excel/next/worker.js?vx"` for the latest version
314+
- 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))
313315

314316
~~~jsx
315317
var spreadsheet = new dhx.Spreadsheet(document.body, {
316-
exportModulePath: "../libs/json2excel/x.x/worker.js"
318+
exportModulePath: "../libs/json2excel/next/worker.js" // latest version; use x.x instead of next for a specific version
317319
});
318320
~~~
319321

‎docs/react/props.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,12 @@ Enable sheet tabs with `multiSheets={true}`. Pass `false` to hide the tab bar en
169169
~~~tsx
170170
<ReactSpreadsheet
171171
sheets={sheets}
172-
importModulePath="../libs/excel2json/x.x/worker.js"
173-
exportModulePath="../libs/json2excel/x.x/worker.js"
172+
importModulePath="../libs/excel2json/next/worker.js" // latest version; use x.x instead of next for a specific version
173+
exportModulePath="../libs/json2excel/next/worker.js" // latest version; use x.x instead of next for a specific version
174174
/>
175175
~~~
176176

177-
Replace `x.x` with the actual version numbers (check the [Excel2Json](https://github.com/dhtmlx/excel2json) and [Json2Excel](https://github.com/dhtmlx/json2excel) GitHub repositories).
177+
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).
178178

179179
### European number formatting
180180

0 commit comments

Comments
 (0)