Excel export changes from 9.0.6 to 9.1.1

Hello,
I’ve recently updated from 9.0.6 to 9.1.1, and in testing, the excel export now places all of the tasks in the first column

Did anything change that isnt mentioned in the release notes?

Here is my example data and config:
data

[
{
“id”: “1002”,
“start_date”: “2025-01-01”,
“text”: “1235456”,
“duration”: 1,
“parent”: null,
“color”: “#9A42BE”,
“isDeelrenovatie”: false,
“progress”: 0,
“type”: “project”,
“end_date”: “2025-02-01”
},
{
“id”: “M_1002”,
“start_date”: “2024-07-01”,
“text”: “Verhuisbeweging”,
“duration”: 0,
“parent”: “1002”,
“color”: “#001328”,
“isDeelrenovatie”: false,
“progress”: 0,
“type”: “milestone”,
“rollup”: true,
“milestoneTonenOpParent”: true,
“milestone_end_date”: “2024-12-31T23:00:00.000Z”
},
{
“id”: “T_1002”,
“start_date”: “2025-01-01”,
“text”: “1235456”,
“duration”: 1,
“parent”: “1002”,
“color”: “#9A42BE”,
“isDeelrenovatie”: false,
“progress”: 0,
“milestoneId”: “M_1002”,
“end_date”: “2025-02-01”
}
]

config

const exportGantt = Gantt.getGanttInstance({
container: ‘ganttExport’,
plugins: {
export_api: true,
},
config: {
readonly: true,
duration_unit: ‘month’,
duration_step: 1,
xml_date: ‘%Y-%m-%d’,
server_utc: true,
keep_grid_width: false,
grid_resize: true,
round_dnd_dates: true,
},
data: {
tasks: data,
links: [],
},
});

exportGantt.ext.zoom.init(zoomConfig);
exportGantt.ext.zoom.setLevel(‘month’);

exportGantt.templates.task_text = function (start, end, task) {
return ‘’;
};

any help is greatly appreciated

Hello @KoenMorren,

Thank you for the provided details.

I tested your configuration and dataset in both versions (9.0.6 and 9.1.1), and the Excel export behaves the same in both cases. The task names appear in the first column (grid):

Could you please clarify what exactly you mean by “the excel export now places all of the tasks in the first column”?

If possible, could you share a screenshot or the exported Excel file? That would help better understand the issue.

Also, please note that the structure of the exported Excel file can be customized using the columns property of the exportToExcel method. This parameter allows you to explicitly define which task fields should be exported and in what order. For example:

gantt.exportToExcel({
    columns: [
        { id: "text", header: "Task Name", },
        { id: "start_date", header: "Start date", type: "date" },
        { id: "end_date", header: "End date", type: "date" },
    ],
})

Here’s an example: DHTMLX Snippet Tool.

At the moment, there were no changes in the export functionality between 9.0.6 and 9.1.1 that would affect column placement in Excel, so this behavior is likely related to configuration.

Hello @Valeria_Ivashkevich
Thanks for the response!

The full config is this

const exportGantt = Gantt.getGanttInstance({
container: ‘ganttExport’,
plugins: {
export_api: true,
},
config: {
readonly: true,
duration_unit: ‘month’,
duration_step: 1,
xml_date: ‘%Y-%m-%d %H:%i’,
columns: [
{
name: ‘text’,
label: ‘Renovatieplan’,
resize: true,
tree: true,
width: showFullMessage ? 400 : 250,
template: function (task) {
if (task.parent !== 0) return task.text;

                        const rp = that.getRenovatiePlanById(+task.id);
                        const verkoopPart = rp.hasVerkoopWoningenTijdensRenovatiePlan
                            ? `${
                                  showFullMessage
                                      ? ' (bevat woning(en) die verkocht zullen worden voordat plan zal eindigen)'
                                      : ' <span style="color: red; font-weight:bold;">(*)</span>'
                              }`
                            : '';

                        return `${task.text}${verkoopPart}`;
                    },
                },
                {
                    name: 'start_date',
                    label: 'Start op',
                    template: function (task) {
                        if (task.parent !== 0) return '';
                        return moment(task.start_date).format('YYYY-MM');
                    },
                    align: 'left',
                    width: 100,
                    resize: true,
                },
                {
                    name: 'aantal_woningen',
                    template: function (task) {
                        if (task.parent !== 0) return '';

                        const rp = that.getRenovatiePlanById(+task.id);
                        const hasVerkoopPart = rp.aantalVerkoopWoningen > 0 ? ` (${rp.aantalVerkoopWoningen} in verkoop)` : '';

                        return `${rp.aantalWoningen} woningen(en)${hasVerkoopPart}`;
                    },
                    width: 250,
                },
            ],
            keep_grid_width: false,
            grid_resize: true,
            round_dnd_dates: true,
        },
        data: {
            tasks: data,
            links: [],
        },
    });

the result I get when i export with the 9.0.6 version is the following
https://imgur.com/a/2uvFr9R

the result I get when I export with the 9.1.1 version is the following
https://imgur.com/a/OHAPVWI

(I had to use imgur because i am not allowed to attach media it would seem)

Thanks again!

Hello @KoenMorren,

Thanks for sharing your configuration.

I was able to reproduce the described issue. It is likely related to the use of the deprecated xml_date configuration property.

This property is deprecated and is no longer recommended for use. Instead, you should use date_format.

In your case, using xml_date leads to incorrect date parsing, which affects how task durations are calculated and, consequently, how tasks are rendered in the timeline.

After applying this change, the tasks should be rendered correctly in the timeline, and the Excel export should match the expected result.

Please let me know if everything works as expected after this update.

Best regards,
Valeria Ivashkeivch
DHTMLX Support Engineer