1

Using SheetJS js-xlsx "xlsx": "0.15.1" js is there a way to write excel file with chart.

Basically I want to export html page that contains chart into an excel file.

HTML page is getting exported successfully but the chart in the page is not getting displayed.

Here is the code I have used

let wb =XLSX.utils.book_new();

 let element: any = document.getElementById('page1');
 let ws = XLSX.utils.table_to_sheet(element);
 XLSX.utils.book_append_sheet(wb,ws,'page1');
2
  • what charting library are you using to draw chart in html ? Commented Sep 9, 2019 at 15:25
  • Provide a sample of element. Commented Sep 10, 2019 at 3:26

1 Answer 1

1

Are you using the Community build or the Pro?

As stated here, The Community build reflects the data cached in charts as worksheets. Other chart-related features, including writing and reading metadata, are included in the Pro compendium.

Remember to include your work as Chartsheet, just in case. It will continue to render it as a Worksheet if you are using the community version, but it will help us to understand the desired behavior that you are seeking.

If you provide more reference for the code, maybe we can show you some shortcuts to make it work.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.