试图从 url 加载一个 .xlsx 文件,但它给出了错误,例如,
Fatal error: Uncaught InvalidArgumentException: File
"http://localhost/test/csvfile/samplesms.xlsx" does not exist. in
D:\wamp\www\test\vendor\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Shared\File.php on line 137
加载文件如下,
$filename = "http://localhost/test/csvfile/samplesms.xlsx";
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader('Xlsx');
$reader->setReadDataOnly(TRUE);
$spreadsheet = $reader->load($filename);
文件已经在给定位置。