Posted by Noodle on 10/07/06 10:33
toffee wrote:
> Hi all,
>
> i have several php files which each run a different SELECT query and
> displays the data in a table. I would like to create an option to export the
> table to excel and one route i would like to go down is creating a single
> export.php file with an excel header; and basically it would read the sql
> query stored in a session; and just create a spreadsheet from the results.
> the problem is each query yields a different number of columns, so what php
> code would tell it to select all fields for every row rather than specifying
> each field one by one?
>
> I hope this makes sense to you.
>
> Kind regards
>
> T
Try outputting your results in a CSV format. Excel can read this quite
well.
Navigation:
[Reply to this message]
|