Laravel Excel Excel Expel Extect of AWS S3 Buccet不起作用的Excel

发布于 2025-01-27 06:11:16 字数 535 浏览 4 评论 0原文

我正在使用Matwebsite Laravel Excel在现有Excel和Export中进行一些更新。我正在使用 export 方法在Excel中进行一些更新。当我提供本地服务器路径时,它运行良好,但是如果我使用Amazon S3存储桶路径,则无法正常工作。在下面的$ awspath中不起作用。如果我使用我的本地服务器文件,则

public static function beforeExport(beforeExport $event)
{
  $event->writer->reopen(new LocalTemporaryFile($awsPath),Excel::XLSX)
}

它的工作原理将返回以下错误

例外:“ phpoffice \ phpspreadsheet \ reader \ exception” 文件:“供应商\ phpoffice \ phpspreadsheet \ src \ phpspreadsheet \ sharone \ file.php” 线:149 消息:“文件”“不存在。”

I am using matwebsite Laravel excel to do some updates in existing excel and export. I am using beforeExport method to do some updates in the excel. when i provide my local server path it works great but if i use amazon s3 bucket path it is not working. here in below $awsPath not working. if I use my local server file then it works

public static function beforeExport(beforeExport $event)
{
  $event->writer->reopen(new LocalTemporaryFile($awsPath),Excel::XLSX)
}

it returns below error

exception: "PhpOffice\PhpSpreadsheet\Reader\Exception"
file: "vendor\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Shared\File.php"
line: 149
message: "File "" does not exist."

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文