Export to Microsoft Project


#1

Can we export expanded data to gantt even when nodes are not expanded? Also would like to know if we can export filtered data to MPP from Gantt.


#2

Hello Ankita,
If you need to export a file into Gantt, Gantt will accept the data as it is in the file. If there are some collapsed tasks, Gantt will still import them.

If you have collapsed tasks and want to export all tasks from Gantt, then you don’t need to worry about it, because Gantt exports all tasks in the chart(even if you don’t see them). You can check how it works in the following example:
https://snippet.dhtmlx.com/9acf86630

If you want to export only filtered tasks, there is no built-in option for that. It is possible to export custom data with data property or with raw:true parameter in the exportToPDF() function, but exportToExcel() and exportToMSProject() functions don’t have that functionality.
So you need to apply the following workaround:

  1. Backup all existing data.
  2. Save filtered tasks data.
  3. Clear all data from Gantt.
  4. Load filtered tasks and export them.
  5. Load the backed up data.
    You can see how it works in the following example:
    http://snippet.dhtmlx.com/5cc37e3ff