diff --git a/docs/api/spreadsheet_exportmodulepath_config.md b/docs/api/spreadsheet_exportmodulepath_config.md index 1a050977..f339213d 100644 --- a/docs/api/spreadsheet_exportmodulepath_config.md +++ b/docs/api/spreadsheet_exportmodulepath_config.md @@ -20,7 +20,7 @@ exportModulePath?: string; ~~~jsx {2} const spreadsheet = new dhx.Spreadsheet("spreadsheet", { - exportModulePath: "../libs/json2excel/1.0/worker.js", + exportModulePath: "../libs/json2excel/x.x/worker.js?vx", // a local path to the `worker.js` file of the export module // other config parameters }); ~~~ @@ -31,14 +31,12 @@ const spreadsheet = new dhx.Spreadsheet("spreadsheet", { DHTMLX Spreadsheet uses the WebAssembly-based library [JSON2Excel](https://github.com/dhtmlx/json2excel) for export of data into Excel. ::: -To export files you need to: +To export files you need to set the path to the **worker.js** file of the [Json2Excel](https://github.com/dhtmlx/json2excel) library (where export will be processed) via the **exportModulePath** option. By default, `https://cdn.dhtmlx.com/libs/json2excel/next/worker.js?vx` is used. +- if you use the public export server, you don't need to specify the link to it, since it is used by default +- if you use your own export server, you need to: + - install the [**Json2Excel**](https://github.com/dhtmlx/json2excel) library + - use `"../libs/json2excel/x.x/worker.js?vx"` for a specific version (replace `x.x` with the version deployed on your server) -- 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. **Related articles:** [Data loading and export](loading_data.md#exporting-data) diff --git a/docs/loading_data.md b/docs/loading_data.md index 2173468f..8ebafbba 100644 --- a/docs/loading_data.md +++ b/docs/loading_data.md @@ -300,18 +300,21 @@ DHTMLX Spreadsheet provides the ability to export data from a spreadsheet into a #### How to export data -{{note Please note that the export feature won't work in the Internet Explorer browser.}} +:::note +Please note that the export feature won't work in the Internet Explorer browser. +::: -The library uses the WebAssembly-based library [Json2Excel](https://github.com/dhtmlx/json2excel) to enable the functionality of export to Excel. Thus, to have the possibility of exporting files you need to: +The library uses the WebAssembly-based library [Json2Excel](https://github.com/dhtmlx/json2excel) to enable the functionality of export to Excel. Export is processed at the **worker.js** file of the **Json2Excel** library (the default link is `https://cdn.dhtmlx.com/libs/json2excel/next/worker.js?vx`). You can use either the public export server or a local export server. Thus, to have the possibility of exporting files you need to: -- 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"` +- specify the [](api/spreadsheet_exportmodulepath_config.md) option in the Spreadsheet configuration and set the path to the **worker.js** file: + - if you use the public export server, you don't need to specify the link to it, since it is used by default + - if you use your own export server, you need to: + - install the [**Json2Excel**](https://github.com/dhtmlx/json2excel) library + - use `"../libs/json2excel/x.x/worker.js?vx"` for a specific version (replace `x.x` with the version deployed on your server) ~~~jsx var spreadsheet = new dhx.Spreadsheet(document.body, { - exportModulePath: "../libs/json2excel/1.0/worker.js" + exportModulePath: "../libs/json2excel/x.x/worker.js?vx" // the path to the export module, if a local export server is used }); ~~~ @@ -325,7 +328,9 @@ spreadsheet.export.xlsx(); **Related sample**: [Spreadsheet. Export Xlsx](https://snippet.dhtmlx.com/btyo3j8s?tag=spreadsheet) -{{note Please note that the component supports export to Excel files with the **.xlsx** extension only.}} +:::note +Please note that the component supports export to Excel files with the `.xlsx` extension only. +::: #### How to set a custom name for an exported file diff --git a/docs/react/props.md b/docs/react/props.md index fbdd48fb..16a05170 100644 --- a/docs/react/props.md +++ b/docs/react/props.md @@ -169,11 +169,13 @@ Enable sheet tabs with `multiSheets={true}`. Pass `false` to hide the tab bar en ~~~tsx ~~~ +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