It is not difficult to import data into execl with javasript. Basically, it is to create a new ActiveXObject ("Excel.Application") object and then operate on this object. Create a new sheet page, and then specify the form to input data.
xlsheet.Cells(29,2).value=titleArray[0];
But this cannot be done if the statistical pie chart on the page is exported to execl. I personally think there are three ways to do this:
1. Use functions to directly generate statistical pie charts in execl
2. Make a template, and then transfer the statistical values to execl. The premise is that your execl template has already prepared various statistical graphs, and then execl will automatically generate statistical graphs based on the passed-in values.
I personally think the second method is better, because this way you can easily control the styles of various statistical charts. Even if you use a program to directly generate statistical charts, you still need to transfer the data to execl, and then call a function based on the numerical value to generate it.