fbpx

Exporting Bryntum Gantt to Microsoft Project

While talking to our customers we kept hearing the need for exporting the Gantt chart to MS Project, so we decided to do something about this. In this blog post we will walk you through how to use the Microsoft Project Exporter feature for Bryntum Gantt. Let’s jump right in!

What is this feature about?

Microsoft Project is a very popular tool for managing projects and a lot of our clients want to use our web based Gantt interface to make edits to a schedule and then bring the result back into MS Project. Exporting the Gantt to Microsoft Project is hence a very important feature for Project Managers and users who prefer working with their Gantt charts in Microsoft Project.

The MS Project Exporter feature was implemented to be light and simple. You do not have to use any third party libraries or server side code to use it. The feature converts your Bryntum Gantt chart to an XML file format supported by Microsoft Project.

A sample exported Bryntum Gantt dataset:

Opened in MS Project:

The export will preserve all your tasks, dependencies, durations, dates, assignments and many other data properties available in Bryntum Gantt.

Using the feature

With very little code, you can enable the exporter feature in your Gantt. First of all, include the feature in your Gantt features configuration:

const gantt = new Gantt({
    features : {
        // enable the feature Microsoft Project export
        mspExport : true
    }
    ...
});

After this, you can export the chart, by calling the export() method on the feature:

const gantt = new Gantt({
    features : {
        // enable the feature Microsoft Project export
        mspExport : true
    },
    tbar : [
        {
            type : 'button',
            text : 'Export to MSP',
            onAction() {
                // export the gantt to a XML file
                gantt.features.mspExport.export();
            }
        }
    ]
    ...
});

And that’s it! Now you are able to open your Bryntum Gantt chart in Microsoft Project!

Optional configurations

You can specify which version of MS Project you are targeting with the msProjectVersion (as of the date of this blog post, 2013 and 2019 are supported). There is also an optional config for you to define the exported file name:

const gantt = new Gantt({
    features : {
        mspExport : {
            filename : 'My Gantt Project'
        }
    }
    ...
});

You can also define your file name when calling the export function.

Try it online

To try it out, please see the MS Project Export demo.

Learn more

You will find more information about this feature in the API documentation.

Please leave us your feedback and suggestions, and we hope you enjoy using this feature!

Leave a Reply

avatar
  Subscribe  
Notify of