PHPExcel Reader Example #06

Simple File Reader Loading All WorkSheets

'; $objReader = PHPExcel_IOFactory::createReader($inputFileType); echo 'Loading all WorkSheets
'; $objReader->setLoadAllSheets(); $objPHPExcel = $objReader->load($inputFileName); echo '
'; echo $objPHPExcel->getSheetCount(),' worksheet',(($objPHPExcel->getSheetCount() == 1) ? '' : 's'),' loaded

'; $loadedSheetNames = $objPHPExcel->getSheetNames(); foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) { echo $sheetIndex,' -> ',$loadedSheetName,'
'; } ?>