BCC

Export XLS not working in Javascript chart

Recommended Posts

Hi,

After upgrading to Fusioncharts version 3.11.0 and using Javascript renderer, we are not able to export chart data in XLS format. Below is the screenshot:

image.png.81456a4439fa40af6acbc998febdea33.png

After clicking on XLS, Excel throws below error:

image.thumb.png.ffcc60940681a10a25a69d371e59217f.png

When the user clicks Yes, an empty spreadsheet opens with no data.

 

Can you please advise how we can provide the feature to export chart data into XLS or CSV?

 

Thanks.

 

Share this post


Link to post
Share on other sites

On investigating the above the problem, we came to the observations that the alert box is popping up when the excel file is opened using MS Excel, the reason behind it is that the recent version of MS Excel takes  xlsx files as the extension hence an alert box is showing before opening, however other Excel software such as WPS Office, Libre Office are getting opened properly without any alert message.

 

We have already reported the problem to the concerned team and will be sharing a fix in our upcoming FusionExcel feature using which you will be able to resolve the problem, we will let you know when the feature is released.

Share this post


Link to post
Share on other sites

The puzzling thing is some of the chart data is getting exported to xls (in new version of MS Excel) but others are throwing an error. Does the make sense?

Is there a built-in way to export chart data to csv without writing much additional code?

Share this post


Link to post
Share on other sites

Hi,

Yes you could get the CSV data of the chart using FusionCharts built-in API method  getCSVData, for details please check this link  - https://www.fusioncharts.com/dev/api/fusioncharts/fusioncharts-methods.html#getCSVData

Also for further reference please check the sample fiddle - https://jsfiddle.net/fusioncharts/L486ydop/

Share this post


Link to post
Share on other sites

Hi,

Hope you are doing great.

 

We have released a new feature Excel Export using which the above problem could be solved. To know more check this documentation link - https://www.fusioncharts.com/dev/exporting-charts/using-excelexport/overview

Share this post


Link to post
Share on other sites

Hi thanks for the update. But it is very complicated to integrate this into an existing application. Few questions:

1. What are server-side steps for integrating in Java application?

2. Since "Export As XLS" is not working, how can it be removed from the list in export chart popup?

3. getCSVData method only returns the csv data immediately after the chart is rendered. If that is invoked after few mins, then it returns null. Any idea on how to fix that?

 

Thanks.

Share this post


Link to post
Share on other sites

What are server-side steps for integrating into Java application?
Check this link - https://www.fusioncharts.com/dev/exporting-charts/using-excelexport/excel-export-server-side-setup
 

Since "Export As XLS" is not working, how can it be removed from the list in export chart popup?
Check this sample fiddle for reference - http://jsfiddle.net/29vmfqm7/
 

getCSVData method only returns the csv data immediately after the chart is rendered. If that is invoked after few mins, then it returns null. Any idea on how to fix that?
Please share us a scale down sample replicating the problem so that we could investigate it further.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now