使用PhpSpreadsheet库来导入远程Excel表格 // 远程Excel文件URL $url = 'https://example.com/remote-file.xlsx'; // 保存文件的本地路径 $localFilePath = public_path() . '\test.xls'; // 下载远程Excel文件并保存到本地 file_put_contents($localFilePath