View Full Version : exporting data in mysql to an excel sheet
sudhakararaog
10-21-2007, 06:39 AM
I need to export data that is in a table to an excel sheet with the field names on top followed by the values of the fields. I know how to extract the data and display with echo statement, however i need the code which would display this information in a excel sheet. any help will be appreciated.
Thanks.
GO ILLINI
10-21-2007, 07:38 AM
if you write a file in php with tabular data(using table tags <table>,<tr>,<td>,...) and dave it as filename.xls, it will shot up correctly in Excel.
for example write this code into a .txt doc on your desktop
<table>
<tr>
<td>col 1 row 1</td>
<td>col 2 row 1</td>
</tr>
</table>
then change it to .xls
-Adam
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.