Excel export not working for large size data


#1

excel export not working for large size data


#2

Hello Prakash,
It can happen because of the following reasons:

  1. When you export the data, Gantt saves all your tasks and sends them in a request to the export server. If you use our online export server, the request size is limited:
    https://docs.dhtmlx.com/gantt/desktop__export.html#limitsonrequestsize

  2. There is an issue with export functionality. We are aware of that, and it will be fixed in the future. I cannot give you any ETA, but I will notify you when the issue is fixed.

However, please, reproduce the issue in the snippet so that I can be sure why it happens in your case:
http://snippet.dhtmlx.com/ffd5a0bbd
After adding your configuration, make sure that the issue is reproduced, then click on the “Share” button and send me the link.


#3

Hi Ramil,

We’re also having issues with our Export to Excel. I see it only happens when visual is set to true, but that’s exactly what we want to export.
When do you expect to have a solution for this?

Thanks,

Maurice


#4

Hello Maurice,
Unfortunately, I cannot give you any ETA.
The issue should occur when you export without the grid or specify tasks in the data parameter.
As a workaround, you can export when the grid is enabled and do not use the data parameter.
If you have a different use case, please reproduce the issue in the snippet and send it to me and I will check what might be wrong there.


#5

I’m using this code to call the export, with some custom header names etc.

gantt.exportToExcel({
				name: "SPS_export.xlsx",
				columns: [{
						id: "id",
						header: spsLabels.column.workorder,
						width: 130
					},
					{
						id: "desc",
						header: spsLabels.column.description,
						width: 230
					},
					{
						id: "start_date",
						header: spsLabels.column.start_date,
						width: 120,
						type: "date"
					},
					{
						id: "status",
						header: spsLabels.column.wostatus,
						width: 150
					},
					{
						id: "wotype",
						header: spsLabels.column.wotype,
						width: 120
					},
					{
						id: "prioritydesc",
						header: spsLabels.column.wopriority,
						width: 130
					}
				],
				visual: true,
				cellColors: true

It’s working without the “visual: true”. With the parameter set to true, even with just 1 task (check for limit on large request size) it’s not working.

Where can I create a snippet?

Thank you.


#6

Hello Maurice,
I cannot reproduce the issue when I add your export configuration:
http://snippet.dhtmlx.com/5/03bb19a13

If you export the data with the timeline activated and don’t use the data parameter in the export function, the issue might be related to something else, but it is hard to suggest what might be wrong. You can modify the code in the snippet above to reproduce the issue, then click on the"Share" button and send me the link.


#7

Hi,

I’ve managed to capture the network traffic to the export API, see attached file.

The error it returns (in the background on the API call) is:

TypeError: Cannot read property ‘$level’ of undefined

Please have a look at this. Thank you.

excel_export_issue-data.json (14.3 KB)


#8

Hello Maurice,
Thank you for sending the JSON data.
Looks like the issue occurs because of the $color and $end properties:
http://snippet.dhtmlx.com/5/969d2a47d

If you use those properties in your task data, you need to avoid using the properties that start from $ as these properties are considered as the system and temporary ones.
If you don’t use those properties, it means that Gantt added them when saving the task data in a request string.
I need to reproduce the issue from the initial data to see what might be wrong.