Because of a bug in the Office2003 compatibility pack, there can be some small issues when opening Excel2007 spreadsheets (mostly related to formula calculation). You can enable Office2003 compatibility with the following code:
$objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel); $objWriter->setOffice2003Compatibility(true);
$objWriter->save("05featuredemo.xlsx");
i Office2003 compatibility should only be used when needed Office2003 compatibility option should only be used when needed. This option disables several Office2007 file format options, resulting in a lower-featured Office2007 spreadsheet when this option is used.
Serialized file format
Serialized file format is a manner of storing a PHPExcel spreadsheet to disk, creating a file containing a serialized PHPExcel instance. It offers a fast and easy way to store and read a spreadsheet.
i Serialized file format should not be used as a persistent storage method! Since serialized files may not be compatible trough different PHPExcel versions, it is not a good idea to use this as a persistent storage method. Think of the serialized file format as a temporary storage, for example between 2 batch scripts that depend on each other’s output.
PHPExcel_Reader_Serialized
Reading a spreadsheet
You can read a .phpxl file using the following code:
You can write a .phpxl file using the following code:
$objWriter = new PHPExcel_Writer_Serialized($objPHPExcel);
$objWriter->save("05featuredemo.phpxl");
Excel 5 (BIFF) file format
Excel5 file format is the old Excel file format, implemented in PHPExcel to provide a uniform manner to create both .xlsx and .xls files. It is basically a modified version of PEAR Spreadsheet_Excel_Writer, and has the same limitations and features as the PEAR library.
Excel5 file format will not be developed any further, it just provides an additional file format for PHPExcel.
i Excel5 (BIFF) limitations Please note that BIFF file format has some limits regarding to styling cells and handling large spreadsheets via PHP.
PHPExcel_Reader_Excel5
Reading a spreadsheet
You can read an .xls file using the following code: