importModulePath
Description
Optional. Sets the path to the import module
Usage
importModulePath?: string;
Example
const spreadsheet = new dhx.Spreadsheet("spreadsheet", {
importModulePath: "../libs/excel2json/1.0/worker.js",
// other config parameters
});
Details
note
DHTMLX Spreadsheet uses the WebAssembly-based library Excel2json to import data from Excel.
To import files, you need to:
- install the Excel2json library
- set the path to the worker.js file with the
importModulePathoption in one of two ways:- by providing a local path to the file on your computer, like:
"../libs/excel2json/1.0/worker.js" - by providing a link to the file from CDN:
"https://cdn.dhtmlx.com/libs/excel2json/1.0/worker.js"
- by providing a local path to the file on your computer, like:
By default, the link to CDN is used.
Related article: Data loading and export
Related sample: Spreadsheet. Custom Import Export Path