PHPExcel Reader Example #02
Simple File Reader using a Specified Reader
';
$objReader = new \PhpOffice\PhpSpreadsheet\Reader\Xls();
// $objReader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
// $objReader = new \PhpOffice\PhpSpreadsheet\Reader\Excel2003XML();
// $objReader = new \PhpOffice\PhpSpreadsheet\Reader\Ods();
// $objReader = new \PhpOffice\PhpSpreadsheet\Reader\SYLK();
// $objReader = new \PhpOffice\PhpSpreadsheet\Reader\Gnumeric();
// $objReader = new \PhpOffice\PhpSpreadsheet\Reader\CSV();
$spreadsheet = $objReader->load($inputFileName);
echo '
';
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);
var_dump($sheetData);
?>