Page 1 of 1

Send Email with Table Data Export

Posted: Tue Oct 20, 2009 12:12 am
by marcusreed
I am creating a site where users input data into a table and then run reports on that data. I want to be able to click a button that says "Email Report" and have that particular data exported into an already formatted excel file which is then sent as an attachment to the recipient. I don't even know where to get started on this one. Can someone please help?!

Re: Send Email with Table Data Export

Posted: Tue Oct 20, 2009 3:44 am
by Mark Baker
marcusreed wrote:I am creating a site where users input data into a table and then run reports on that data. I want to be able to click a button that says "Email Report" and have that particular data exported into an already formatted excel file which is then sent as an attachment to the recipient. I don't even know where to get started on this one. Can someone please help?!
First step is to extract the data from your database and insert it into the Excel file. For that, you need a library like PHPExcel

Re: Send Email with Table Data Export

Posted: Fri Oct 23, 2009 3:52 pm
by marcusreed
I have thumbed through the documentation for phpexcel and can't find where you can get the data from the database.

Re: Send Email with Table Data Export

Posted: Fri Oct 23, 2009 6:08 pm
by Mark Baker
marcusreed wrote:I have thumbed through the documentation for phpexcel and can't find where you can get the data from the database.
PHPExcel doesn't extract any data from any database, it allows you to populate the cells in an Excel worksheet from data that you extract from the database.