After my article “How To Make Microsoft Word Documents with PHP” (using Interop capability under Windows), there were quite a few comments urging a pure PHP implementation, i.e., only using a universal PHP library to manipulate Office files.
In this article, we will see how to use a PHPExcel library to provide an “Export to Excel” function in a web app so that the user can export the data into an Excel 2007/2013 file for further analysis.
NOTE: There are a few PHP libraries that can provide Excel (and Office) file manipulations. The lib we use here is called PHPExcel, a subset of PHPOffice, which can be cloned here.
Objectives
After this tutorial, we will get:
- A sheet showing the game information (date played, teams, score, win/lose status) of my favorite NBA team - LA Lakers, in its 2013-14 season.
- A button that will export the data into an Excel 2013 file.
- That Excel file will be populated with some additional analytic data and a chart also generated by PHP and Excel.
Let’s get started.
Continue reading %Generate Excel Files and Charts with PHPExcel%
more
{ 0 comments... » Generate Excel Files and Charts with PHPExcel read them below or add one }
Post a Comment