Send Email with Table Data Export
Moderator: General Moderators
-
marcusreed
- Forum Newbie
- Posts: 7
- Joined: Sat Oct 10, 2009 12:11 pm
Send Email with Table Data Export
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?!
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: Send Email with Table Data Export
First step is to extract the data from your database and insert it into the Excel file. For that, you need a library like PHPExcelmarcusreed 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?!
-
marcusreed
- Forum Newbie
- Posts: 7
- Joined: Sat Oct 10, 2009 12:11 pm
Re: Send Email with Table Data Export
I have thumbed through the documentation for phpexcel and can't find where you can get the data from the database.
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: Send Email with Table Data Export
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.marcusreed wrote:I have thumbed through the documentation for phpexcel and can't find where you can get the data from the database.