News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

NetTuts.com:
How to Generate a Complete Excel Spreadsheet From MySQL
November 23, 2011 @ 17:52:54

On NetTuts there's a new tutorial showing how to take data from a MySQL database and translate it into a usable Excel file with the help of some simple PHP.

A CSV (Comma Separated Value) file is usually sufficient for exporting MySQL data as an Excel Spreadsheet. These CSV files are data only though. A real Excel spreadsheet has formatting, formulas and perhaps even graphics - the difference between a simple method of data transfer and a professional report. This tutorial shows how to use open source PHP components to create "real" Excel spreadsheets from MySQL SELECT statements.

With the help of the PHPExcel tool, making Excel-formatted files is a simple process. They show how to label columns, pull data out with a "quick and dirty" SQL statement, formatting the results to something a bit more clean and iterate through the pages of data to push them into the spreadsheet (including formulas). You can download the full source to get everything in one shot.

0 comments voice your opinion now!
excel spreadsheet tutorial phpexcel mysql database


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: Creating an RSS Aggregator with the PHP SimplePie Library

PHPClasses.org: Lately in PHP, Episode 31 - The Urge to Kill Older PHP Versions

phpRiot.com: Fetching Data With Zend_Db

NETTUTS.com: How to Write a "Most Popular By Views" WordPress Plugin

PHPBuilder.com: Use Zend Framework Action Helpers to Reduce PHP Code Redundancy


Community Events





Don't see your event here?
Let us know!


podcast list developer unittest code install interview release introduction language testing symfony2 refactor experience laravel framework series community threedevsandamaybe opinion

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework