XML Export for Gantt Chart

What is the schema that the Gantt chart uses for the export to XML?
Is this XML compatible with MS Project?

Hello,
if you mean an XML created by gantt.serialize method
docs.dhtmlx.com/gantt/api__gantt_serialize.html

In order to export data to MS PRoject, you can check an experimental method
gantt.exportToMSProject()
It is currently defined in our export API, but not yet released and not supported officially.
docs.dhtmlx.com/gantt/desktop__export.html

As a quickest test - you can execute it in browser console in this example
docs.dhtmlx.com/gantt/samples/08 … xport.html

It will generate an XML file from a gantt chart, which can be opened in MS Project (you’ll need to select XML type when opening file)

The method takes a object argument, which can contain a file name:
gantt.exportToMSProject({name: ‘custom.xml’});

Scheduling mode for MS Project - manually scheduled or auto-scheduled
gantt.exportToMSProject({manual: false});

and some others.

Currently export should export all tasks, most of relations (it removes cyclic links, and ones that are considered invalid by a MS project, e.g. from summary task to it’s subtask). Calendar (worktime) should be also imported.

Hi,

In using the hosted export api:exportToMSProject() function , can you add CDATA tags around the task name exported to XML format as a “&” character in the XML causes MS project to reject the XML file as corrupt.

Thanks
Kevin

Hi,

Online version is updated, now all XML tag must have content wrapped in CDATA sections.

Hi Stanislav,

The XML exported file using exportToMSProject() function is now always rejected as corrupt by Ms Project 2013, can you apply the CDATA tag to the name field only ?

Thanks
Kevin

Hi Stanislav,

Actually, the XML exported using exportToMSProject() is not well -formed, and so it rejected by MS Project 2013.

Thanks
Kevin

Sorry for inconvenience, the service was updated, not it must produce the valid XML, using CDATA only for text items.

Hi there, i´m new here and trying to export the gantt to the project from the function gantt.exportToMSProject() from api.js, and appears this message:" error on line 199 at column 17: expected ‘>’ ". Any hint in how to fix this??

Please check docs.dhtmlx.com/gantt/snippet/8af75657 - it works for default dataset.

Be sure that you are using the latest Gantt ( exportToMSProject API may work incorrectly with an outdated version of the Gantt )

If issue still occurs, please share a demo link or a snippet.

I found the problem… when data is for example: text:“áéíóú”, it will give an xml not valid by project. When the text:“aeiou” the xml come perfectly.

We have updated the online service, please try now, it must work correctly with any unicode chars.

Now it’s working perfectly!! Thanks!!