-
Notifications
You must be signed in to change notification settings - Fork 5
[update] docs related to export with json2excel/excel2json libraries #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
| }); | ||
| ~~~ | ||
|
|
@@ -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: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. По поводу фрагмента - by providing a local path to the file on your computer не оч корректная формулировка и лучше использовать тож самое что и в Suite актуально ко всем местам где оно встречается |
||
| - 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)) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. для cdn можно не указывать эту часть (актуально ко всем cdn фрагментам): |
||
|
|
||
| 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) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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)) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. наверное ссылки на версионные файлы в cdn(те которые не next) не нужно давать, оч мало шансов что юзерам понадобится неактуальная версия в целом(как я понимаю) - ожидаемые сценарии:
так что в моментах с локальным экспорта - можно писать про x.x, а в моментах с cdn - стоит оставить next |
||
|
|
||
| ~~~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 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. можно не добавлять комментарий |
||
| }); | ||
| ~~~ | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Comment on lines
+172
to
+173
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. можно не добавлять комментарии |
||
| /> | ||
| ~~~ | ||
|
|
||
| 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 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
комментарий можно убрать
// latest version; use x.x instead of next for a specific version