PhpSpreadsheet \ Reader \ Exception 无法将 /root_dir/public/laravel-excel-fLRGTlw9uEE2XRz0k1fXdcg2wfs2R

Posted

技术标签:

【中文标题】PhpSpreadsheet \\ Reader \\ Exception 无法将 /root_dir/public/laravel-excel-fLRGTlw9uEE2XRz0k1fXdcg2wfs2RWy7.html 作为 DOM 文档加载 [关闭]【英文标题】:PhpSpreadsheet \ Reader \ Exception Failed to load /root_dir/public/laravel-excel-fLRGTlw9uEE2XRz0k1fXdcg2wfs2RWy7.html as a DOM Document [closed]PhpSpreadsheet \ Reader \ Exception 无法将 /root_dir/public/laravel-excel-fLRGTlw9uEE2XRz0k1fXdcg2wfs2RWy7.html 作为 DOM 文档加载 [关闭] 【发布时间】:2021-04-28 06:51:37 【问题描述】:

我已经尝试了一切来解决这个问题,但没有任何效果。

php artisan cache:clear
php artisan view:clear
php artisan route:clear
php artisan config:clear

还更新了我的依赖项

composer dump-auto -a
composer update

但是这些东西对我没有任何帮助

请尽快回复。

【问题讨论】:

【参考方案1】:

问题是有一个 Closing Anchor 标记,这是造成问题的原因,因为在生成 Excel 时不能有额外的东西或仅缺少 纯 HTML 表格仅适用于 excel 文件生成

【讨论】:

【参考方案2】:

我的问题是由 & 字符引起的,我不得不将其更改为 &

【讨论】:

您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center。

以上是关于PhpSpreadsheet \ Reader \ Exception 无法将 /root_dir/public/laravel-excel-fLRGTlw9uEE2XRz0k1fXdcg2wfs2R的主要内容,如果未能解决你的问题,请参考以下文章

phpspreadsheet 读取 Excel 表格问题

使用 PHPSpreadsheet 打开受密码保护的 XLSX 文件

PhpSpreadsheet foreach 循环通过多个工作表

PHPSpreadsheet - 如何从 PHPSpreadsheet 创建一个 zip 文件?

PHP 使用 PhpSpreadsheet

PHP 使用 PhpSpreadsheet