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

Zend Developer Zone:
Reading and Writing Spreadsheets with PHP
Apr 03, 2008 @ 08:49:19

On the Zend Developer Zone, Vikram Vaswani has posted a tutorial that shows hos to "break the language barrier" between PHP and Microsoft's Excel to allow for the reading and writing of spreadsheet data directly from one to the other.

When it comes to playing nice with data in different formats, PHP's pedigree is hard to beat. Not only does the language make it a breeze to deal with SQL result sets and XML files, but it comes with extensions to deal with formats as diverse as Ogg/Vorbis audio files, ZIP archives and EXIF headers. So it should come as no surprise that PHP can also read and write Microsoft Excel spreadsheets, albeit with a little help from PEAR.

After grabbing the different parts needed (the PHP-ExcelReader package and the Spreadsheet_Excel_Writer PEAR package, he shows how to create a simple spreadsheet with just numeric information in it. For something a bit more interesting, he goes the other way and shows spreadsheet data as an HTML table.

Other examples included as well are things like: pushing spreadsheet data into a database, working with formulas and styling it to your liking.

tagged: spreadsheet excel pear package phpexcelreader writer tutorial

Link:

Martynas Jusevicius' Blog:
Reading Excel files with PHP
Dec 17, 2007 @ 13:46:00

Martynas Jusevicius has pointed out a handy tool to work with Microsoft Excel files in PHP - PHPExcelReader.

There is a nice tool for reading Microsoft Excel files called PHPExcelReader. It works with .xls files up to Excel version 2003, which are based on the BIFF format (later versions use OOXML). It is written in native PHP and does not require any third-party libraries or the MS Office package.

He includes an example of it in use - a loop that runs through the cells of a spreadsheet and outputs each of them (going across the row via an inner for loop as well).

tagged: read excel file library phpexcelreader biff ooxml read excel file library phpexcelreader biff ooxml

Link:

Martynas Jusevicius' Blog:
Reading Excel files with PHP
Dec 17, 2007 @ 13:46:00

Martynas Jusevicius has pointed out a handy tool to work with Microsoft Excel files in PHP - PHPExcelReader.

There is a nice tool for reading Microsoft Excel files called PHPExcelReader. It works with .xls files up to Excel version 2003, which are based on the BIFF format (later versions use OOXML). It is written in native PHP and does not require any third-party libraries or the MS Office package.

He includes an example of it in use - a loop that runs through the cells of a spreadsheet and outputs each of them (going across the row via an inner for loop as well).

tagged: read excel file library phpexcelreader biff ooxml read excel file library phpexcelreader biff ooxml

Link: