Export to excel 7.9.8

Hey guys,
I just noticed something and figured I let others know just in case there is a confusion.
I upgraded to 7.9.8 and I noticed my export to excel function wasn't working, well more like it would export it but when trying to open that file in windows there would be a error popup saying "file can't be read" or something like that.
after some investigation I noticed that if in your script code you have the following:

system.dataset.exportExcel(fileName, 1, [table.date])
or
system.dataset.exportExcel(fileName, 1, [table.date,table1.date,...])

This used to work before 7.9.8 but it doesn't anymore since there is a new "Null Empty" parameter.
to fix this you can do the following:

system.dataset.exportExcel(fileName, 1, table.date,0)
or
system.dataset.exportExcel(fileName, 1, [table.date,table1.date,...],0)

That last 0 is to show 0 for NULL values or empty cell. I was using square bracket for my data because some places I was exporting multiple data sources.
Anyways hope this helps those that have this issue.

5 Likes

As a heads up - there is another regression we noticed related to the fix for the ‘nullsEmpty’ parameter that causes the Easy Chart’s data export to be blank. That fix, and consistent behavior for exportExcel (with or without a sequence of datasets, with and without a nullsEmpty argument) should go into 7.9.9.

Any quick fix for exporting from easycharts? I typically just hit the save icon after selecting some data in an easychart, but am getting an error opening the file. Can I change the format for the easychart export? Or should I script a new button (and is there an easy way to do that)?

You can call system.dataset.exportExcel() manually; to get the data out of the chart just get the chart component and use the exportDatasets() function.