3v4l.org

run code in 300+ PHP versions simultaneously
<?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 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
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 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
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.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Fatal error: Class 'PHPExcel_IOFactory' not found in /in/8usaQ on line 2
Process exited with code 255.

preferences:
204.6 ms | 402 KiB | 228 Q