![]() CATEGORIES: BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism |
Office 2003 compatibility packBecause 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->save("05featuredemo.xlsx");
i Office2003 compatibility should only be used when needed 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! PHPExcel_Reader_Serialized Reading a spreadsheet You can read a .phpxl file using the following code: $objReader = new PHPExcel_Reader_Serialized(); $objPHPExcel = $objReader->load("05featuredemo.phpxl"); PHPExcel_Writer_Serialized Writing a spreadsheet 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 PHPExcel_Reader_Excel5 Reading a spreadsheet You can read an .xls file using the following code: $objReader = new PHPExcel_Reader_Excel5(); $objPHPExcel = $objReader->load("05featuredemo.xls"); Read data only You can set the option setReadDataOnly on the reader, to instruct the reader to ignore styling, data validation, … and just read cell data: $objReader = new PHPExcel_Reader_Excel5(); $objReader->setReadDataOnly(true); $objPHPExcel = $objReader->load("05featuredemo.xls"); Read specific sheets only You can set the option setLoadSheetsOnly on the reader, to instruct the reader to only load the sheets with a given name: $objReader = new PHPExcel_Reader_Excel5(); $objReader->setLoadSheetsOnly( array("Sheet 1", "My special sheet") ); $objPHPExcel = $objReader->load("05featuredemo.xls"); Date: 2016-03-03; view: 1420
|