How to use Gantt export module


#1

I downloaded the Gantt export module, but I don’t know how to use the module to export excel in Vue CIL


#2

Hello Shuang,
It is expected to run the export module on a separate computer (or at least in a different application).
You can find the instructions for running it in the Readme file.
After you run it, you need to connect the contents of the export’s api.js file to the file with the Gantt configuration:
http://export.dhtmlx.com/gantt/api.js
Then you can use the export functions and specify the URL of the export module:

gantt.exportToExcel({
    name:"document.xlsx", 
    server:"https://your.url/gantt",
});

https://docs.dhtmlx.com/gantt/api__gantt_exporttoexcel.html#:~:text=the%20column%20type-,server,--%20(string)%20sets%20the

Recently, the dev team added support to the import and export functions for the node.js Gantt version, so, you will need to remove the following lines from the file:

var FormData = require('form-data');

In the future, you won’t need to do that, as the necessary configuration will be included in the dhtmlxgantt.js file. But I cannot give you any ETA.

Here is a Vue demo:
https://files.dhtmlx.com/30d/4438fb8d015aa12ea5a7c4c87650d818/vue+export.zip