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
4 changes: 2 additions & 2 deletions docs/grid/api/export/grid_xlsx_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/grid/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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).

Expand Down
4 changes: 2 additions & 2 deletions docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
~~~
Expand Down