как вывод, который я должен получить данные из файла Excel < /p>
< /p> file < /p> < /p> ExcelShow () {< /p>
Код: Выделить всё
$filePath = WRITEPATH . 'public/Book1.xlsx';
$spreadsheet = IOFactory::load($filePath);
$worksheet = $spreadsheet->getActiveSheet();
$rows = [];
foreach ($worksheet->getRowIterator() as $row) {
$cellIterator = $row->getCellIterator();
$cellIterator->setIterateOnlyExistingCells(false);
$cells = [];
foreach ($cellIterator as $cell) {
$cells[] = $cell->getValue();
}
$rows[] = $cells;
}
echo "
";
print_r($rows);
echo "";
Подробнее здесь: https://stackoverflow.com/questions/795 ... eigniter-4
Мобильная версия