converts an Excel file to JSON
config | object | an object with configuration properties of an imported file |
gantt.importFromExcel({
server:"https://export.dhtmlx.com/gantt",
data: file,
callback: function(project){
console.log(project)
}
});
The method requires HTML5 File API support.
This method is defined in the export extension, so you need to activate the export_api plugin. Read the details in the Export/Import for Excel, Export to iCal article.
If you use the Gantt version older than 8.0, you need to include the https://export.dhtmlx.com/gantt/api.js on your page to enable the online export service, e.g.:
<script src="codebase/dhtmlxgantt.js"></script>
<script src="https://export.dhtmlx.com/gantt/api.js"></script>
The method takes as a parameter an object with configuration properties of an imported file:
The response will contain a JSON with an array of objects:
[
{ "Name": "Task Name", "Start": "2018-08-11 10:00", "Duration": 8 },
...
]
where: