I am trying to generate a XLS sheet with multiple sheets, styles, background colors and so on using PHP.
Right now all data lie in HTML tables. (Sheet1.html, Sheet2.html …)
Is there any library to convert HTML into one xls file?
Thx
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is a good PHP Class.
http://phpexcel.codeplex.com/
This is a general idea on how to do this. I’m assuming your HTML tables are in a 2-dimensional array. If it’s not yet an array, here’s a good link to do this conversion from HTML table to array in PHP.
With the first index as the row (excel’s row numbers) and the second index as the column (excel’s column letters). The code below is the first sample code from the site and I modified the data part to insert data from a 2-dimensional array.