Export Gantt to Excel (Some parts of this workbook may have been repaired or discarded.)

I’m trying to export our Gantt chart to Excel but it’s creating a corrupted Excel file and then when I open it the view it’s losing the layout on more complex Gantt charts.

I only get the error if I set the flag for “visual: true”

Here is the basic chart I’m testing on now

And a link to the generated excel file Dropbox - File Deleted

Once we start getting a more complex gantt then the excel loses formatting entirely as you can see here Dropbox - File Deleted

The code right now is very simplistic
public exportToExcel() {
gantt.exportToExcel({
name: ‘test.xlsx’,
visual: true
});
}

Any help would be greatly appreciated

Hello Gavin,
Please, clarify which part of the formatting is broken. Is it the different task bar color, the scales, the text that is displayed outside the task bar or something else?

Could you also reproduce the issue in the snippet then click on the Share button and send me the link? If there is a bug, I will give all the information you provided to the dev team.

It is the actual Gantt visualisation part on the right hand side.

I’m not sure which snippet you are referring to? I did link the broken excel file, was hoping you guys could see what data was being submitted to that incorrectly

Hello Gavin,
Sorry, forgot to add the link for the snippet, here it is:
https://snippet.dhtmlx.com/38ee1b370

I noticed only the following issues:
MS Office:

LibreOffice:

As you can see, there are different issues in different programs. Please, tell me which program you use and which issues you mean.

Hi Ramil,

I’m using MS Office and I’m not as worried about the text as I am about the bars not displaying properly and the excel file popping up with that error in the beginning.

As you can see here, the top part of the image is the website, second part is the pdf I exported and the third part is the excel

You can see the bars are entirely incorrect in Excel. I’m struggling to replicate a complex system in your snippet page unfortunately

I’ve replicated the issue in a snippet
http://snippet.dhtmlx.com/d6f230e01

If you export with visual:true you will receive the error.

as an aside, does the snippet use a different server as if I use this code locally with visual:false it doesn’t indent properly for me?

Hello Gavin,
Thank you for sending the snippet. I reproduced the issue.
But you use the old Gantt version, and you didn’t specify the date_format correctly.
After fixing that, I don’t get the error message, and the task bars aren’t misaligned anymore:

http://snippet.dhtmlx.com/b1f135818