Hi, I’m currently using the exportToExcel function and sometimes when I set the visual: “base-color” and cellColors: true options, it returns a json with the values instead of the file object. I haven’t figured the reason out yet, becuase in some scenarios I’ve emptied all my tasks to export the gantt and it returns de JSON anyways.
It might be good to know if I have to code a parser from this JSON to my excel or know wether it returns the file object or the JSON.
Hello Victor,
The Excel export function is not supposed to return the JSON data.
Right now, if you add the data and visual parameters to the export function, it doesn’t work, because Gantt expects that the tasks will be rendered in the timeline.
You can see that it is reproduced in the following snippet: https://snippet.dhtmlx.com/0y1zm0lb
The dev team will fix the bug in the future, but I cannot give you any ETA.
As a workaround, you can simulate “task loading”: extend the timeline, obtain the cell number for the $start and $end parameters, export the data and restore the initial date range: http://snippet.dhtmlx.com/5/d498a7932
If that doesn’t help you, it is hard to suggest what might be wrong as I don’t see your code. In that case, please add your configuration to the following snippet and make sure that the issue is reproduced there:
Then, click on the Save button and send me the link.
Or send me a ready demo with all the necessary JavaScript and CSS files so that I can reproduce the issue locally.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan