I will look again at PHPExcel. PHPExcel has entries for Excel5 (xls), Excel2007 (xlsx), CSV, HTML and PDF; and readers for Excel5 (xls), Excel2007 (xlsx), Excel 2003 XML, CSV, SYLK, and Open Office Calc
All this is perfectly clear in the documentation.
EDIT (quoted in manual)
There are two methods of reading in a file in PHPExcel: using automatic file type detection or explicitly.
Automatic file type detection is checked by another PHPExcel_Reader_IReader distributed with PHPExcel. If one of them can load the specified file name, the file is loaded using this PHPExcel_Reader_IReader. In explicit mode, you need to specify which PHPExcel_Reader_IReader to use.
You can create an instance of PHPExcel_Reader_IReader using PHPExcel_IOFactory in automatic file type resolution mode using the following code example:
$objPHPExcel = PHPExcel_IOFactory::load("05featuredemo.xlsx");
A typical use of this feature is when you need to read files uploaded by your users and you donβt know if they download xls or xlsx files.
If you need to set some properties on a reader (for example, read-only data, more on this in more detail), you can use this option instead:
$objReader = PHPExcel_IOFactory::createReaderForFile("05featuredemo.xlsx"); $objReader->setReadDataOnly(true); $objReader->load("05featuredemo.xlsx");
You can instantiate PHPExcel_Reader_IReader using PHPExcel_IOFactory in explicit mode using the following code example:
$objReader = PHPExcel_IOFactory::createReader("Excel2007"); $objPHPExcel = $objReader->load("05featuredemo.xlsx");
EDIT (Personal Preferences)
It is also useful to wrap your bootloader in try / catch
$fileName = '01simple.xlsx'; try { $objPHPExcel = PHPExcel_IOFactory::load($fileName); } catch (Exception $e) { die("Error loading file: ".$e->getMessage()."<br />\n"); }