zhaojs
2023-06-10 9971bdfb616d42f69e706a6096b67e43c749630c
1
2
3
4
5
6
7
8
9
10
11
<?php
 
use PhpOffice\PhpSpreadsheet\IOFactory;
 
require __DIR__ . '/../Header.php';
 
$inputFileName = __DIR__ . '/sampleData/example1.xls';
$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using IOFactory to identify the format');
$spreadsheet = IOFactory::load($inputFileName);
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);
var_dump($sheetData);