mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-10-06 03:47:43 +00:00
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\IOFactory;
|
||||
|
||||
require __DIR__ . '/../Header.php';
|
||||
|
||||
$inputFileName = __DIR__ . '/sampleData/non-existing-file.xls';
|
||||
$helper->log('Loading file ' . pathinfo($inputFileName, PATHINFO_BASENAME) . ' using IOFactory to identify the format');
|
||||
try {
|
||||
$spreadsheet = IOFactory::load($inputFileName);
|
||||
} catch (InvalidArgumentException $e) {
|
||||
$helper->log('Error loading file "' . pathinfo($inputFileName, PATHINFO_BASENAME) . '": ' . $e->getMessage());
|
||||
}
|
||||
Reference in New Issue
Block a user