Skip to main content

exportModulePath

Description​

Optional. Sets the path to the export module

Usage​

exportModulePath?: string;

Example​

const spreadsheet = new dhx.Spreadsheet("spreadsheet", {
exportModulePath: "../libs/json2excel/x.x/worker.js?vx", // a local path to the `worker.js` file of the export module
// other config parameters
});

Details​

note

DHTMLX Spreadsheet uses the WebAssembly-based library JSON2Excel to export data to Excel.

To export files, you need to set the path to the worker.js file of the Json2Excel library (where the export is processed) with 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 library
    • use "../libs/json2excel/x.x/worker.js?vx" for a specific version (replace x.x with the version deployed on your server)

Related article: Data loading and export

Related sample: Spreadsheet. Custom Import Export Path