16 lines
509 B
PHP
16 lines
509 B
PHP
<?php
|
|
|
|
use PhpOffice\PhpSpreadsheet\IOFactory;
|
|
|
|
require __DIR__ . '/../Header.php';
|
|
|
|
$inputFileType = 'Xls';
|
|
$inputFileName = __DIR__ . '/sampleData/example1.xls';
|
|
|
|
$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using IOFactory with a defined reader type of ' . $inputFileType);
|
|
$reader = IOFactory::createReader($inputFileType);
|
|
$spreadsheet = $reader->load($inputFileName);
|
|
|
|
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);
|
|
var_dump($sheetData);
|