mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-22 01:43:42 +00:00
252474c1bd
* Scrutinizer Clean Up Tests No source code involved. * Scrutinizer Whack-a-mole Fixed 17, added 10. Trying again. * Simplify Some Tests Eliminate some null assertions. * Dead Code Remove 2 statements.
16 lines
607 B
PHP
16 lines
607 B
PHP
<?php
|
|
|
|
use PhpOffice\PhpSpreadsheet\IOFactory;
|
|
use PhpOffice\PhpSpreadsheet\Reader\Exception as ReaderException;
|
|
|
|
require __DIR__ . '/../Header.php';
|
|
|
|
$inputFileName = __DIR__ . '/sampleData/non-existing-file.xls';
|
|
$helper->log('Loading file ' . /** @scrutinizer ignore-type */ pathinfo($inputFileName, PATHINFO_BASENAME) . ' using IOFactory to identify the format');
|
|
|
|
try {
|
|
$spreadsheet = IOFactory::load($inputFileName);
|
|
} catch (ReaderException $e) {
|
|
$helper->log('Error loading file "' . /** @scrutinizer ignore-type */ pathinfo($inputFileName, PATHINFO_BASENAME) . '": ' . $e->getMessage());
|
|
}
|