reactjshighchartsreact-highchartsreact-class-based-component

How to customize Excel sheet format after download in HighCharts


I am trying to download my excel sheet using "this.downloadXLS()" in React Highcharts. It's downloading my excel sheet but I am getting some "chart" label in the downloaded excel sheet (In A1 Row of excel) like this....

Reference Image: https://yourimageshare.com/ib/qeN04SKVs2

PS: You can download excel sheet by clicking on Hamburger Menu --> DownloadXLSX

This is my codeSandBox, What I have tried so far: https://codesandbox.io/s/export-stockchart-forked-6zx5qj?file=/src/index.js

I want to remove that "chart" label from the downloaded excel sheet. I have tried to set chart title to "undefined" and "null", But none of the method is working. Please suggest me some ideas. Thanks in Advance.


Solution

  • You need to disable the tableCaption option:

      exporting: {
        tableCaption: false,
        ...
      }
    

    Live demo: https://codesandbox.io/s/export-stockchart-plg6rn

    API Reference: https://api.highcharts.com/highcharts/exporting.tableCaption