PhpSpreadsheet Reader Example #02

Simple File Reader using a Specified Reader

'; $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xls(); // $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx(); // $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xml(); // $reader = new \PhpOffice\PhpSpreadsheet\Reader\Ods(); // $reader = new \PhpOffice\PhpSpreadsheet\Reader\Slk(); // $reader = new \PhpOffice\PhpSpreadsheet\Reader\Gnumeric(); // $reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv(); $spreadsheet = $reader->load($inputFileName); echo '
'; $sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true); var_dump($sheetData); ?>