From 063d9f48d47da39f96177c4777b8349de123714a Mon Sep 17 00:00:00 2001 From: Masha_Rudenko Date: Mon, 25 May 2026 15:36:47 +0300 Subject: [PATCH 1/2] [update] docs related to export with json2excel library --- docs/grid/api/export/grid_xlsx_method.md | 4 ++-- docs/grid/usage.md | 6 +++--- docs/migration.md | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/grid/api/export/grid_xlsx_method.md b/docs/grid/api/export/grid_xlsx_method.md index 4b14b378..6f393124 100644 --- a/docs/grid/api/export/grid_xlsx_method.md +++ b/docs/grid/api/export/grid_xlsx_method.md @@ -16,7 +16,7 @@ DHTMLX Grid uses the WebAssembly-based library [Json2Excel](https://github.com/d @params: - `config` - (optional) an object with export settings. You can specify the following settings for export to Excel: - - `url?: string` - (optional) the path to the **worker.js** file of the [Json2Excel](https://github.com/dhtmlx/json2excel) library (where export will be processed) set as `"../libs/json2excel/1.3/worker.js?vx"`, if the local export server is used. The path to the public export server is used by default + - `url?: string` - (optional) the path to the **worker.js** file of the [Json2Excel](https://github.com/dhtmlx/json2excel) library (where export will be processed) set as `"../libs/json2excel/x.x/worker.js?vx"`, if the local export server is used. Replace `x.x` with the actual library version (check the [GitHub repository](https://github.com/dhtmlx/json2excel)). The path to the public export server is used by default - `name?: string` - (optional) "grid" by default. The name of a ready Excel file - `tableName?: string` - (optional) "data" by default. The name of a sheet with grid data in the Excel file - `dateFormatMask?: string` - (optional) "dd/mm/yy" by default. The mask used for [dates formatting in Excel](https://support.microsoft.com/en-us/office/format-a-date-the-way-you-want-in-excel-8e10019e-d5d8-47a1-ba95-db95123d273e) @@ -37,7 +37,7 @@ grid.export.xlsx() // export with config settings grid.export.xlsx({ - url: "../libs/json2excel/1.3/worker.js?vx", // a local path to the `worker.js` file of the export module + url: "../libs/json2excel/x.x/worker.js?vx", // a local path to the `worker.js` file of the export module name: "my_file", // the name of a ready Excel file tableName: "grid", // the name of a sheet with grid data in the Excel file dateFormatMask: "mm.dd.yy" // the date format mask for Excel diff --git a/docs/grid/usage.md b/docs/grid/usage.md index 168622b5..ea22098d 100644 --- a/docs/grid/usage.md +++ b/docs/grid/usage.md @@ -485,10 +485,10 @@ Thus, to have the possibility of exporting files you need to: - 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 - - provide a local path to the export module on your computer by setting the path to the **worker.js** file as `"../libs/json2excel/1.3/worker.js?vx"`, as a value of the `url` option in the configuration object of the [`xlsx()`](grid/api/export/grid_xlsx_method.md) method + - provide a local path to the export module on your computer by setting the path to the **worker.js** file as `"../libs/json2excel/x.x/worker.js?vx"`, as a value of the `url` option in the configuration object of the [`xlsx()`](grid/api/export/grid_xlsx_method.md) method ~~~jsx grid.export.xlsx({ - url: "../libs/json2excel/1.3/worker.js?vx", // a local path to the export module + url: "../libs/json2excel/x.x/worker.js?vx", // a local path to the export module name: "my_file", // the name of a ready Excel file, "grid" by default tableName: "grid", // the name of a sheet with grid data in the Excel file, "data" by default dateFormatMask: "mm.dd.yy" // the date format mask for Excel, "dd/mm/yy" by default @@ -498,7 +498,7 @@ grid.export.xlsx({ .finally(() => console.log("finished")); ~~~ -You can check the latest version of the Json2Excel library at the [github repository](https://github.com/dhtmlx/json2excel). +Replace `x.x` with the actual version number. You can check the latest version of the Json2Excel library at the [GitHub repository](https://github.com/dhtmlx/json2excel). Read the details on dates formatting in Excel in the [related Excel documentation](https://support.microsoft.com/en-us/office/format-a-date-the-way-you-want-in-excel-8e10019e-d5d8-47a1-ba95-db95123d273e). diff --git a/docs/migration.md b/docs/migration.md index 25de688e..6e1730dc 100644 --- a/docs/migration.md +++ b/docs/migration.md @@ -21,11 +21,11 @@ Since v9.2 the Grid component uses the WebAssembly-based library [Json2Excel](ht ##### From v9.2 -The link to the public export server is used by default, so you don't need to specify it. If you use your own export server, you need to install the **Json2Excel** library and provide the local path to the export module on your computer by setting the path to the **worker.js** file as `"../libs/json2excel/1.3/worker.js?vx"`: +The link to the public export server is used by default, so you don't need to specify it. If you use your own export server, you need to install the **Json2Excel** library and provide the local path to the export module on your computer by setting the path to the **worker.js** file as `"../libs/json2excel/x.x/worker.js?vx"` (replace `x.x` with the actual version from the [GitHub repository](https://github.com/dhtmlx/json2excel)): ~~~jsx grid.export.xlsx({ - url: "../libs/json2excel/1.3/worker.js?vx", // the path to the export module, if a local export server is used + url: "../libs/json2excel/x.x/worker.js?vx", // the path to the export module, if a local export server is used // more export settings }); ~~~ From 64c9140752b13554afd8021b9324eb14b1b86c4d Mon Sep 17 00:00:00 2001 From: Masha_Rudenko Date: Fri, 5 Jun 2026 11:32:43 +0300 Subject: [PATCH 2/2] [update] clarify Json2Excel export URL options in Grid docs - add default CDN URL (next/worker.js) to url param description, usage guide, and migration guide - offer next (latest) and x.x (specific version) as parallel options with clear or connector - update code examples to use next as default URL with inline comment for x.x alternative - remove dangling 'Replace x.x' sentences, fold version note into descriptions --- docs/grid/api/export/grid_xlsx_method.md | 4 +++- docs/grid/usage.md | 10 ++++------ docs/migration.md | 6 ++++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/grid/api/export/grid_xlsx_method.md b/docs/grid/api/export/grid_xlsx_method.md index 6f393124..7f4894fe 100644 --- a/docs/grid/api/export/grid_xlsx_method.md +++ b/docs/grid/api/export/grid_xlsx_method.md @@ -16,7 +16,9 @@ DHTMLX Grid uses the WebAssembly-based library [Json2Excel](https://github.com/d @params: - `config` - (optional) an object with export settings. You can specify the following settings for export to Excel: - - `url?: string` - (optional) the path to the **worker.js** file of the [Json2Excel](https://github.com/dhtmlx/json2excel) library (where export will be processed) set as `"../libs/json2excel/x.x/worker.js?vx"`, if the local export server is used. Replace `x.x` with the actual library version (check the [GitHub repository](https://github.com/dhtmlx/json2excel)). The path to the public export server is used by default + - `url?: string` - (optional) the path to the **worker.js** file of the [Json2Excel](https://github.com/dhtmlx/json2excel) library (where export will be processed). By default, `https://cdn.dhtmlx.com/libs/json2excel/next/worker.js?vx` is used. + + For a local export server, set the path to the **worker.js** file relative to your server: use `"../libs/json2excel/next/worker.js?vx"` for the latest version, or `"../libs/json2excel/x.x/worker.js?vx"` for a specific version (replace `x.x` with the actual version number). - `name?: string` - (optional) "grid" by default. The name of a ready Excel file - `tableName?: string` - (optional) "data" by default. The name of a sheet with grid data in the Excel file - `dateFormatMask?: string` - (optional) "dd/mm/yy" by default. The mask used for [dates formatting in Excel](https://support.microsoft.com/en-us/office/format-a-date-the-way-you-want-in-excel-8e10019e-d5d8-47a1-ba95-db95123d273e) diff --git a/docs/grid/usage.md b/docs/grid/usage.md index ea22098d..6dea9c42 100644 --- a/docs/grid/usage.md +++ b/docs/grid/usage.md @@ -477,18 +477,18 @@ You can easily export data of Grid into the Excel, CSV, PDF, or PNG format. Besi #### Exporting data to Excel -Since v9.2 DHTMLX Grid uses the WebAssembly-based library [Json2Excel](https://github.com/dhtmlx/json2excel) to enable the export to Excel functionality and the [`xlsx()`](grid/api/export/grid_xlsx_method.md) method of the `Export` module to export data from Grid into an Excel file. You can use either the public export server or a local export server. +Since v9.2 DHTMLX Grid uses the WebAssembly-based library [**Json2Excel**](https://github.com/dhtmlx/json2excel) to enable the export to Excel functionality and the [`xlsx()`](grid/api/export/grid_xlsx_method.md) method of the `Export` module to export data from Grid into an Excel file. 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: - call the [`xlsx()`](grid/api/export/grid_xlsx_method.md) method of the `Export` module. The method takes an [object with export settings](grid/api/export/grid_xlsx_method.md) as a parameter (all settings are optional) and returns a promise of data export. - 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 - - provide a local path to the export module on your computer by setting the path to the **worker.js** file as `"../libs/json2excel/x.x/worker.js?vx"`, as a value of the `url` option in the configuration object of the [`xlsx()`](grid/api/export/grid_xlsx_method.md) method + - install the [**Json2Excel**](https://github.com/dhtmlx/json2excel) library + - provide a local path to the **worker.js** file as the `url` option: use `"../libs/json2excel/next/worker.js?vx"` for the latest version, or `"../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 grid.export.xlsx({ - url: "../libs/json2excel/x.x/worker.js?vx", // a local path to the export module + url: "../libs/json2excel/next/worker.js?vx", // latest version; use x.x instead of next for a specific version name: "my_file", // the name of a ready Excel file, "grid" by default tableName: "grid", // the name of a sheet with grid data in the Excel file, "data" by default dateFormatMask: "mm.dd.yy" // the date format mask for Excel, "dd/mm/yy" by default @@ -498,8 +498,6 @@ grid.export.xlsx({ .finally(() => console.log("finished")); ~~~ -Replace `x.x` with the actual version number. You can check the latest version of the Json2Excel library at the [GitHub repository](https://github.com/dhtmlx/json2excel). - Read the details on dates formatting in Excel in the [related Excel documentation](https://support.microsoft.com/en-us/office/format-a-date-the-way-you-want-in-excel-8e10019e-d5d8-47a1-ba95-db95123d273e). **Related sample**: [Grid. Export to xlsx and csv](https://snippet.dhtmlx.com/58oqij47) diff --git a/docs/migration.md b/docs/migration.md index 6e1730dc..d5ce7295 100644 --- a/docs/migration.md +++ b/docs/migration.md @@ -21,11 +21,13 @@ Since v9.2 the Grid component uses the WebAssembly-based library [Json2Excel](ht ##### From v9.2 -The link to the public export server is used by default, so you don't need to specify it. If you use your own export server, you need to install the **Json2Excel** library and provide the local path to the export module on your computer by setting the path to the **worker.js** file as `"../libs/json2excel/x.x/worker.js?vx"` (replace `x.x` with the actual version from the [GitHub repository](https://github.com/dhtmlx/json2excel)): +The link to the public export server is used by default (`https://cdn.dhtmlx.com/libs/json2excel/next/worker.js?vx`), so you don't need to specify it. + +If you use your own export server, you need to install the **Json2Excel** library and set the path to the **worker.js** file as the `url` option: use `"../libs/json2excel/next/worker.js?vx"` for the latest version, or `"../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 grid.export.xlsx({ - url: "../libs/json2excel/x.x/worker.js?vx", // the path to the export module, if a local export server is used + url: "../libs/json2excel/next/worker.js?vx", // latest version; use x.x instead of next for a specific version // more export settings }); ~~~