3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $objReader = PHPExcel_IOFactory::createReader('Excel2007'); $objReader->setReadDataOnly(true); $objPHPExcel = $objReader->load("prueba.xlsx"); $objWorksheet = $objPHPExcel->setActiveSheetIndex(0); //objWorksheet = $objPHPExcel->getActiveSheet(); //echo '<table border=1>' . "\n"; foreach ($objWorksheet->getRowIterator() as $row) //obtener la fila { //echo '<tr>' . "\n"; $cellIterator = $row->getCellIterator(); // obtener las celdas de la fila $cellIterator->setIterateOnlyExistingCells(false); // solo las celdas existentes. Me devuelve el mismo // valor que le mando como parametro. True por defecto foreach ($cellIterator as $cell) { echo '<td>' . $cell->getValue() . '</td>' . "\n"; } echo '</tr>' . "\n"; } echo '</table>' . "\n"; ?>
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Class 'PHPExcel_IOFactory' not found in /in/8usaQ:2 Stack trace: #0 {main} thrown in /in/8usaQ on line 2
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Class 'PHPExcel_IOFactory' not found in /in/8usaQ on line 2
Process exited with code 255.