There is an html file with data. It has both input inputs and tables, buttons. New rows and tables are generated using javascript. Those. their count is always different. All have a unique id , which is also generated by type: "a1", "a2", "a3", "b1", "b2" ...

It is also worth noting that there are several divs. In the first, the name is entered, in the second, the data, and in the third, these data are calculated by formulas and inserted into the tables. Accordingly, at each stage two other divs are hidden.

How can this data be exported to excel? For example using phpexcel.

  • On javascript, write a function that will collect all the data in one object and send it to some php script on the server. Next, write this script that accepts this data and uses phpexcel to create the file. - Aleks G
  • @AleksG "collect all data in one object" for example, everything in one table? - Moow
  • No, in one javascript object, most likely, with an array - or just into an array. - Aleks G
  • @AleksG and if my formatting is different in each div, will it be possible to save it during the transfer? it's not the color / font, but the location of the data. so that these data can then be read normally. - Moow
  • Anyway, all the data from html must be transferred to the server, whether with colors, whether with formatting. phpexcel should know how to format a document. From the html-code, he does not understand. - u_mulder

0