I need a function that will accept an SQL query and output the data into an Excel spreadsheet and/or CVS file depending on user selection. I have an existing PHP web application and I will integrate this function into that application. I want the user to be able to click a link of button on a page in the app to execute the export.
I will provide access via FTP to the mySQL database and and the webpages with the appropraite links. I will provide the sql query. An established connection to the database already exists. I only need the function. For someone who has done this and knows what they are doing this should take about 1/2 hour to complete. I need it done today.
I will have additional work if you can turn this around quickly. The next step will be to output to Excel in a specified format. I have to match an existing "report" done in Excel and match their formatting as close as possible. I use the PEAR libraries in my PHP code and have been looking at the PHPExcel - OpenXML - Create Excel2007 documents in PHP - Spreadsheet engine ([url removed, login to view]) this has a lot of formatting capability but it is complex. Another option is: Package for generating Excel spreadsheets (.xls) ([url removed, login to view]) if you have experience with either of these packages it is a big plus for ongoing work with me.