1754878 Members
4430 Online
108827 Solutions
New Discussion

generate excel

 
Sasirekha
Occasional Contributor

generate excel

Hi
I am in basic level of PHP

I need generate a excel file each time fetching data from database.The excel file should contain 2 worksheets each contains contents of 1 tav\ble from database(mysql).The fields of the table should be the column headings in excel sheet and corresponding data's(records) under it.This file should be downloaded in a path each time the script is executed.
1 REPLY 1
Peter Godron
Honored Contributor

Re: generate excel

Hi,
can you please clarify what your output format is to be.

CSV or MS Excel format ?

You could source your data from within EXCEL with ODBC select.
Or as a pseudeo code script:
Set up Oracle environment
connect to the DB
run your query, spooling output to file
disconnect from Oracle