Page 1 of 1

exporting html table to excel/word with conditions

Posted: Mon Jun 22, 2009 9:39 am
by enna
hi i need some help in exporting html table into an excel file..i found some scripts regarding that issue but it doesn't seem work the way i wanted it..the html table will retrieve data from database based on the choice of the user..i have this dropdown list wherein the user needs to choose something and then it will generate the html table..in short i need a script wherein it would like copy paste the html table into an excel/word file..the scripts i got only gives all the data in the database..thank you..

Re: exporting html table to excel/word with conditions

Posted: Mon Jun 22, 2009 1:27 pm
by akuji36
I found this note on another forum :

Excel can convert HTML tables by default. The easiest way to force it to do this is to save the HTML file with an XLS extension. Excel will then open the XLS as if it were its native workbook.

Re: exporting html table to excel/word with conditions

Posted: Mon Jun 22, 2009 8:13 pm
by enna
@akuji36

how is it possible??i mean how can i save it with a xls extension??i am not familiar with that kind..help..thank you

Re: exporting html table to excel/word with conditions

Posted: Mon Jun 22, 2009 9:02 pm
by wpsd2006
search google for phpExcel
the have plenty function for php to excel, well it by pass the html thing
directly from database to php to excel