Class “Vtiful\Kernel\Excel” not found, troubleshooting problems during the use of php-ext-xlswriter
1. Error: class “vtiful\kernel\excel” not found.
2. The reason is that the extension php-ext-xlswriter is not installed.
3. GitHub Release: https://github.com/viest/php-ext-xlswriter/releases download php-windows-xlswriter-cf7e1933-8.1-ts-vs16-x64.zip. as shown in Figure 1
4. After decompression, copy php_xlswriter.dll to C:\php-8.1.27\ext\php_xlswriter.dll
5. Edit php.ini, add extension=xlswriter
6. After restarting php, the error is reported again:[ERROR]workbook_close(): error creatingE:\WWWRoot\Object\Storage\App\Export/Order/Order Export Task 2024-02-19 10:24:06.xls. error = no error. as shown in Figure 2
7. Check the exception details in the table failed_jobs: ERRORREException: fopen(e:\wwwroot\object\storage\app\export/order/order export task 2024-02-19 10:24:06.xls): Failed to open Stream: No such file or directory in
$PATH = storage::disk($this->disk)->putFileas(
$this->BasePath,
$this->Excel->output(),
basename($this->excel->{localfilename})
);
ErrorException: fopen(e:\wwwroot\object\storage\app\export/order/order export task 2024-02-19 10:24:06.xls): Failed to open stream: no such file or directory in E:\wwRoot\Object\Vendor\Laravel\Framework\src\Illuminate\FileSystem\FileSystemAdapter.php:396
stack trace:
#0 E:\WWWRoot\Object\Vendor\Laravel\Framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(259): ILUMINATE\Foundation\Bootstrap\HandleExceptions->HandleError(2,fopen(e:\\wwwroo...,E:\wwwroot\\ERP-..., 396)
#1[internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->illuminate\foundation\bootstrap\{closure}(2,fopen(e:\\wwwroo...,E:\wwwroot\\ERP-..., 396)
#2 E:\WWWRoot\Object\Vendor\Laravel\Framework\src\Illuminate\FileSystem\FileSystemAdapter.php(396): fopen(E:\wwwroot\\ERP-...,r)
#3 e:\wwwroot\object\app\services\exportservice.php(81): ILUMINATE\FileSystem\FileSystemAdapter->putFileas(export/order,E:\wwwroot\\ERP-...,\xe8\xae\xa2\xe5\x8d\x95\xe5\xaf\xbc\xe5\x87\xba\xe4\xb\xbb\xbb\xbb...)
#4 e:\WWWRoot\Object\Modules\Order\Services\OrderExportService.php(593): App\Services\ExportService->Save()
#5 e:\WWWRoot\Object\Modules\Order\Services\OrderExportService.php(230): Modules\Order\Services\OrderExportService->ExportCheck(array, array,\xe8\xae\xa2\xe5\x8d\x95\xe5\xaf\xbc\xe5\x87\xba\xe4\xb\xbb\xbb\xbb...)
#6 E:\WWWRoot\Object\Modules\Order\Jobs\OrderExportJob.php(52): Modules\Order\Services\OrderExportService->ExportOrderExcel(array, Object(App\Models\JobStatus))
#7 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\boundmethod.php(36): Modules\Order\Jobs\OrderExportJob->Handle()
#8 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\util.php(41): ILUMINATE\Container\BoundMethod::Illuminate\Container\{Closure}()
#9 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\boundmethod.php(93): IlluMinate\Container\util::UnwrapIfClosure(Object(Closure))
#10 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\boundmethod.php(37): ILUMINATE\Container\BoundMethod::callBoundMethod(object(illuminate\foundation\application), array, object(closure))
#11 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\container.php(651): Illuminate\Container\BoundMethod::call(object(illuminate\foundation\application), array, array, null)
#12 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\bus\dispatcher.php(128): IlluMinate\Container\Container->call(array)
#13 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\pipeline\pipeline.php(141): ILUMINATE\Bus\Dispatcher->Illuminate\Bus\{Closure}(object(object(modules\Order\Jobs\OrderExportJob)))
#14 E:\WWWRoot\Object\Vendor\Laravel\Framework\src\Illuminate\Pipeline\Pipeline.php(116): IlluMinate\Pipeline\Pipeline->Illuminate\Pipeline\{Closure}(object(object(modules\Order\Jobs\OrderExportJob)))
#15 E:\wwwroot\object\vendor\Laravel\framework\src\illuminate\bus\dispatcher.php(132): IlluMinate\Pipeline\Pipeline->Then(Object(Closure))
#16 E:\WWWRoot\Object\Vendor\Laravel\Framework\src\Illuminate\Queue\CallQueuedHandler.php(124): IlluMinate\Bus\Dispatcher->DispatchNow(Object(modules\Order\Jobs\OrderExportJob), False)
#17 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\pipeline\pipeline.php(141): ILUMINATE\Queue\CallQueuedHandler->Illuminate\Queu e\{closure}(object(modules\order\jobs\orderExportJob))
#18 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\pipeline\pipeline.php(116): IlluMinate\Pipeline\Pipeline->Illuminate\Pipeline\{Closure}(object(object(modules\Order\Jobs\OrderExportJob)))
#19 E:\WWWRoot\Object\Vendor\Laravel\Framework\src\Illuminate\Queue\CallQueuedHandler.php(126): IlluMinate\Pipeline\Pipeline->Then(Object(Closure))
#20 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\Queue\CallQueuedHandler.php(70): ILUMINATE\Queue\CallQueuedHandler->DispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\RedisJob), Object(modules\Order\Jobs\OrderExportJob))
#21 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\queue\jobs\job.php(98): ILUMINATE\Queue\CallQueuedHandler->call(object(illuminate\queue\jobs\redisjob), array)
#22 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\queue\worker.php(425): ILUMINATE\Queue\Jobs\Job->fire()
#23 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\queue\worker.php(375): ILUMINATE\Queue\Worker->Process(redis, Object(illuminate\Queue\Jobs\RedisJob), Object(illuminate\Queue\WorkerOptions))
#24 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\queue\worker.php(173): ILUMINATE\Queue\Worker->RunJob(Object(Illuminate\Queue\Jobs\RedisJob),redis, Object(illuminate\Queue\WorkerOptions))
#25 E:\WWWRoot\Object\Vendor\Laravel\Framework\src\Illuminate\Queue\Console\WorkCommand.php(150): IlluMinate\Queue\Worker->daemon(redis,export_queue, Object(illuminate\Queue\WorkerOptions))
#26 E:\WWWRoot\Object\Vendor\Laravel\Framework\src\Illuminate\Queue\Console\WorkCommand.php(134): ILUMINATE\Queue\Console\WorkCommand->RunWorker(redis,export_queue)
#27 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\boundmethod.php(36): IlluMinate\Queue\Console\WorkCommand->Handle()
#28 E:\WWWRoot\Object\Vendor\Laravel\Framework\src\Illuminate\Container\util.php(41): ILUMINATE\Container\BoundMethod::Illuminate\Container\{Closure}()
#29 E:\WWWRoot\Object\Vendor\Laravel\Framework\src\Illuminate\Container\BoundMethod.php(93): IlluMinate\Container\util::UnwrapIfClosure(Object(Closure))
#30 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\boundmethod.php(37): ILUMINATE\Container\BoundMethod::callBoundMethod(object(illuminate\foundation\application), array, object(closure))
#31 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\container.php(651): Illuminate\Container\BoundMethod::call(object(illuminate\foundation\application), array, array, null)
#32 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\console\command.php(144): IlluMinate\Container\Container->call(array)
#33 e:\wwwroot\object\vendor\symfony\console\command\command.php(312): ILUMINATE\Console\Command->Execute(Object(Symfony\Component\Console\Input\ArgVinput), Object(illuminate\Console\OutputStyle))
#34 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\console\command.php(126): symfony\component\console\command\command->run(object(symfony\component\console\input\argvinput), Object(illuminate\Console\OutputStyle))
#35 e:\wwwroot\object\vendor\symfony\console\application.php(1022): IlluMinate\Console\Command->Run(Object(Symfony\Component\Console\Input\ArgVinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#36 E:\wwwroot\object\vendor\Symfony\Console\Application.php(314): Symfony\Component\Console\Application->DrunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgVinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#37 e:\wwwroot\object\vendor\Symfony\Console\Application.php(168): symfony\component\console\application->drun(object(symfony\component\console\input\argvinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#38 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\console\application.php(102): Symfony\Component\Console\Application->Run(Object(Symfony\Component\Console\Input\ArgVinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#39 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\foundation\console\kernel.php(151): IlluMinate\Console\Application->Run(Object(Symfony\Component\Console\Input\ArgVinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#40 e:\wwwroot\object\artisan(37): IlluMinate\Foundation\Console\Kernel->Handle(Object(Symfony\Component\Console\Input\ArgVinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#41 {main}
8. Decided to download from the PHP official website: https://pecl.php.net/package/xlswriter/1.5.1/Windows. 8.1 Thread Safe (ts) x64.
9. Report an error: Worksheet row or column index out of range. Reference: list of exception codes. https://xlswriter-docs.viest.me/zh-cn/exception/code . The row or column index of the worksheet is outside the Excel specified range, please check the array key value. as shown in Figure 3
vtiful\kernel\exception: worksheet row or column index out of range. E:\WWRoot\Object\App\Services\ExportService.php:107
stack trace:
#0 E:\WWWRoot\Object\App\Services\ExportService.php(107): VTIful\Kernel\Excel->data(array)
#1 e:\WWWRoot\Object\Modules\Order\Services\OrderExportService.php(581): App\Services\ExportService->writeRows(array)
#2 E:\WWWRoot\Object\Modules\Order\Services\OrderExportService.php(230): Modules\Order\Services\OrderExportService->ExportCheck(array, array,\xe8\xae\xa2\xe5\x8d\x95\xe5\xaf\xbc\xe5\x87\xba\xe4\xb\xbb\xbb\xbb...)
#3 E:\WWWRoot\Object\Modules\Order\Jobs\OrderExportJob.php(52): Modules\Order\Services\OrderExportService->ExportOrderExcel(array, Object(App\Models\JobStatus))
#4 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\boundmethod.php(36): Modules\Order\Jobs\OrderExportJob->Handle()
#5 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\util.php(41): ILUMINATE\Container\BoundMethod::Illuminate\Container\{Closure}()
#6 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\boundmethod.php(93): IlluMinate\Container\util::UnwrapIfClosure(Object(Closure))
#7 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\boundmethod.php(37): ILUMINATE\Container\BoundMethod::callBoundMethod(object(illuminate\foundation\application), array, object(closure))
#8 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\container.php(651): Illuminate\Container\BoundMethod::call(object(illuminate\foundation\application), array, array, null)
#9 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\bus\dispatcher.php(128): IlluMinate\Container\Container->call(array)
#10 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\pipeline\pipeline.php(141): ILUMINATE\Bus\Dispatcher->Illuminate\Bus\{Closure}(object(object(modules\Order\Jobs\OrderExportJob)))
#11 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\pipeline\pipeline.php(116): IlluMinate\Pipeline\Pipeline->Illuminate\Pipeline\{Closure}(object(object(modules\Order\Jobs\OrderExportJob)))
#12 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\bus\dispatcher.php(132): IlluMinate\Pipeline\Pipeline->Then(Object(Closure))
#13 E:\WWWRoot\Object\Vendor\Laravel\Framework\src\Illuminate\Queue\CallQueuedHandler.php(124): IlluMinate\Bus\Dispatcher->DispatchNow(Object(modules\Order\Jobs\OrderExportJob), False)
#14 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\pipeline\pipeline.php(141): ILUMINATE\Queue\CallQueuedHandler->Illuminate\Queu e\{closure}(object(modules\order\jobs\orderExportJob))
#15 E:\wwwroot\object\vendor\Laravel\framework\src\illuminate\pipeline\pipeline.php(116): IlluMinate\Pipeline\Pipeline->Illuminate\Pipeline\{Closure}(object(object(modules\Order\Jobs\OrderExportJob)))
#16 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\Queue\CallQueuedHandler.php(126): IlluMinate\Pipeline\Pipeline->Then(Object(Closure))
#17 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\Queue\CallQueuedHandler.php(70): ILUMINATE\Queue\CallQueuedHandler->DispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\RedisJob), Object(modules\Order\Jobs\OrderExportJob))
#18 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\queue\jobs\job.php(98): ILUMINATE\Queue\CallQueuedHandler->call(object(illuminate\queue\jobs\redisjob), array)
#19 E:\wwwroot\object\vendor\Laravel\framework\src\illuminate\queue\worker.php(425): ILUMINATE\Queue\Jobs\Job->fire()
#20 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\queue\worker.php(375): ILUMINATE\Queue\Worker->Process(redis, Object(illuminate\Queue\Jobs\RedisJob), Object(illuminate\Queue\WorkerOptions))
#21 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\queue\worker.php(173): ILUMINATE\Queue\Worker->RunJob(Object(Illuminate\Queue\Jobs\RedisJob),redis, Object(illuminate\Queue\WorkerOptions))
#22 E:\WWWRoot\Object\Vendor\Laravel\Framework\src\Illuminate\Queue\Console\WorkCommand.php(150): IlluMinate\Queue\Worker->daemon(redis,export_queue, Object(illuminate\Queue\WorkerOptions))
#23 e:\wwwroot\object\vendor\Laravel\framework\src\illuminate\Queue\Console\WorkCommand.php(134): ILUMINATE\Queue\Console\WorkCommand->RunWorker(redis,export_queue)
#24 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\boundmethod.php(36): IlluMinate\Queue\Console\WorkCommand->Handle()
#25 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\util.php(41): ILUMINATE\Container\BoundMethod::Illuminate\Container\{Closure}()
#26 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\boundmethod.php(93): IlluMinate\Container\util::UnwrapIfClosure(Object(Closure))
#27 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\boundmethod.php(37): ILUMINATE\Container\BoundMethod::callBoundMethod(object(illuminate\foundation\application), array, object(closure))
#28 E:\wwwroot\object\vendor\Laravel\framework\src\illuminate\container\container.php(651): Illuminate\Container\BoundMethod::call(object(illuminate\foundation\application), array, array, null)
#29 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\console\command.php(144): IlluMinate\Container\Container->call(array)
#30 e:\wwwroot\object\vendor\symfony\console\command\command.php(312): ILUMINATE\Console\Command->Execute(Object(Symfony\Component\Console\Input\ArgVinput), Object(illuminate\Console\OutputStyle))
#31 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\console\command.php(126): symfony\component\console\command\command->run(object(symfony\component\console\input\argvinput), Object(illuminate\Console\OutputStyle))
#32 e:\wwwroot\object\vendor\symfony\console\application.php(1022): IlluMinate\Console\Command->Run(Object(Symfony\Component\Console\Input\ArgVinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#33 e:\wwwroot\object\vendor\Symfony\Console\Application.php(314): Symfony\Component\Console\Application->DrunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgVinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#34 e:\wwwroot\object\vendor\symfony\console\application.php(168): symfony\component\console\application->drun(object(symfony\component\console\input\argvinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#35 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\console\application.php(102): Symfony\Component\Console\Application->Run(Object(Symfony\Component\Console\Input\ArgVinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#36 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\foundation\console\kernel.php(151): IlluMinate\Console\Application->Run(Object(Symfony\Component\Console\Input\ArgVinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#37 e:\wwwroot\object\artisan(37): IlluMinate\Foundation\Console\Kernel->Handle(Object(Symfony\Component\Console\Input\ArgVinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#38 {main}
Next vtiful\Kernel\Exception: Worksheet row or column index out of range. in E:\WWRoot\Object\App\Services\ExportService.php:107
stack trace:
#0 E:\WWWRoot\Object\App\Services\ExportService.php(107): VTIful\Kernel\Excel->data(array)
#1 e:\WWWRoot\Object\Modules\Order\Services\OrderExportService.php(581): App\Services\ExportService->writeRows(array)
#2 E:\WWWRoot\Object\Modules\Order\Services\OrderExportService.php(230): Modules\Order\Services\OrderExportService->ExportCheck(array, array,\xe8\xae\xa2\xe5\x8d\x95\xe5\xaf\xbc\xe5\x87\xba\xe4\xb\xbb\xbb\xbb...)
#3 E:\WWWRoot\Object\Modules\Order\Jobs\OrderExportJob.php(52): Modules\Order\Services\OrderExportService->ExportOrderExcel(array, Object(App\Models\JobStatus))
#4 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\boundmethod.php(36): Modules\Order\Jobs\OrderExportJob->Handle()
#5 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\util.php(41): ILUMINATE\Container\BoundMethod::Illuminate\Container\{Closure}()
#6 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\boundmethod.php(93): IlluMinate\Container\util::UnwrapIfClosure(Object(Closure))
#7 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\boundmethod.php(37): ILUMINATE\Container\BoundMethod::callBoundMethod(object(illuminate\foundation\application), array, object(closure))
#8 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\container.php(651): Illuminate\Container\BoundMethod::call(object(illuminate\foundation\application), array, array, null)
#9 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\bus\dispatcher.php(128): IlluMinate\Container\Container->call(array)
#10 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\pipeline\pipeline.php(141): ILUMINATE\Bus\Dispatcher->Illuminate\Bus\{Closure}(object(object(modules\Order\Jobs\OrderExportJob)))
#11 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\pipeline\pipeline.php(116): IlluMinate\Pipeline\Pipeline->Illuminate\Pipeline\{Closure}(object(object(modules\Order\Jobs\OrderExportJob)))
#12 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\bus\dispatcher.php(132): IlluMinate\Pipeline\Pipeline->Then(Object(Closure))
#13 E:\WWWRoot\Object\Vendor\Laravel\Framework\src\Illuminate\Queue\CallQueuedHandler.php(124): IlluMinate\Bus\Dispatcher->DispatchNow(Object(modules\Order\Jobs\OrderExportJob), False)
#14 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\pipeline\pipeline.php(141): ILUMINATE\Queue\CallQueuedHandler->Illuminate\Queu e\{closure}(object(modules\order\jobs\orderExportJob))
#15 E:\wwwroot\object\vendor\Laravel\framework\src\illuminate\pipeline\pipeline.php(116): IlluMinate\Pipeline\Pipeline->Illuminate\Pipeline\{Closure}(object(object(modules\Order\Jobs\OrderExportJob)))
#16 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\Queue\CallQueuedHandler.php(126): IlluMinate\Pipeline\Pipeline->Then(Object(Closure))
#17 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\Queue\CallQueuedHandler.php(70): ILUMINATE\Queue\CallQueuedHandler->DispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\RedisJob), Object(modules\Order\Jobs\OrderExportJob))
#18 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\queue\jobs\job.php(98): ILUMINATE\Queue\CallQueuedHandler->call(object(illuminate\queue\jobs\redisjob), array)
#19 E:\wwwroot\object\vendor\Laravel\framework\src\illuminate\queue\worker.php(425): ILUMINATE\Queue\Jobs\Job->fire()
#20 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\queue\worker.php(375): ILUMINATE\Queue\Worker->Process(redis, Object(illuminate\Queue\Jobs\RedisJob), Object(illuminate\Queue\WorkerOptions))
#21 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\queue\worker.php(173): ILUMINATE\Queue\Worker->RunJob(Object(Illuminate\Queue\Jobs\RedisJob),redis, Object(illuminate\Queue\WorkerOptions))
#22 E:\WWWRoot\Object\Vendor\Laravel\Framework\src\Illuminate\Queue\Console\WorkCommand.php(150): IlluMinate\Queue\Worker->daemon(redis,export_queue, Object(illuminate\Queue\WorkerOptions))
#23 e:\wwwroot\object\vendor\Laravel\framework\src\illuminate\Queue\Console\WorkCommand.php(134): ILUMINATE\Queue\Console\WorkCommand->RunWorker(redis,export_queue)
#24 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\boundmethod.php(36): IlluMinate\Queue\Console\WorkCommand->Handle()
#25 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\util.php(41): ILUMINATE\Container\BoundMethod::Illuminate\Container\{Closure}()
#26 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\boundmethod.php(93): IlluMinate\Container\util::UnwrapIfClosure(Object(Closure))
#27 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\container\boundmethod.php(37): ILUMINATE\Container\BoundMethod::callBoundMethod(object(illuminate\foundation\application), array, object(closure))
#28 E:\wwwroot\object\vendor\Laravel\framework\src\illuminate\container\container.php(651): Illuminate\Container\BoundMethod::call(object(illuminate\foundation\application), array, array, null)
#29 E:\wwwroot\object\vendor\laravel\framework\src\illuminate\console\command.php(144): IlluMinate\Container\Container->call(array)
#30 e:\wwwroot\object\vendor\symfony\console\command\command.php(312): ILUMINATE\Console\Command->Execute(Object(Symfony\Component\Console\Input\ArgVinput), Object(illuminate\Console\OutputStyle))
#31 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\console\command.php(126): symfony\component\console\command\command->run(object(symfony\component\console\input\argvinput), Object(illuminate\Console\OutputStyle))
#32 e:\wwwroot\object\vendor\symfony\console\application.php(1022): IlluMinate\Console\Command->Run(Object(Symfony\Component\Console\Input\ArgVinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#33 e:\wwwroot\object\vendor\Symfony\Console\Application.php(314): Symfony\Component\Console\Application->DrunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgVinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#34 e:\wwwroot\object\vendor\symfony\console\application.php(168): symfony\component\console\application->drun(object(symfony\component\console\input\argvinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#35 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\console\application.php(102): Symfony\Component\Console\Application->Run(Object(Symfony\Component\Console\Input\ArgVinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#36 e:\wwwroot\object\vendor\laravel\framework\src\illuminate\foundation\console\kernel.php(151): IlluMinate\Console\Application->Run(Object(Symfony\Component\Console\Input\ArgVinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#37 e:\wwwroot\object\artisan(37): IlluMinate\Foundation\Console\Kernel->Handle(Object(Symfony\Component\Console\Input\ArgVinput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#38 {main}
10. The reason for the final discovery is that the array of $this->excel->data($data); $data is caused by the associated array. When the array is indexed, an error is no longer reported: Worksheet Row or Column Index Out of Range. Continue to report errors:[ERROR]workbook_close(): Error Creating. In the end, I decided not to modify the code, and continue to use php-windows-xlswriter-cf7e1933-8.1-ts-vs16-x64, and the associated array is automatically compatible.
[
{
"PLAT_ORDER_NO": "GM20240204031613_3",
"transaction_no": "202402041"
}
]#ATFP_CLOSE_Translate_span#
[ [ "GM20240204031613_3", "202402041" ]#ATFP_CLOSE_Translate_span# ]
11. Finally found the direct cause, in the output(), the excel file was not generated successfully. The root cause is that the parameter of filename(); contains : , which in turn causes the excel file to not be generated. Rename an XLS file to: Order export task 2024-02-19 17:42:32, it will be automatically adjusted to: Order export task 2024-02-19 174232. Tip: The file name cannot contain any of the following characters: \\:*?”<<>| . As shown in Figure 4
12. Replace : in the filename after _. Exporting Excel file was successful.

![重启 PHP 后,再次报错:[ERROR] workbook_close(): Error creating 'E:\wwwroot\object\storage\app\export/order/订单导出任务2024-02-19 10:24:06.xls'. Error = No error](https://www.shuijingwanwq.com/wp-content/uploads/2024/03/2-1.png)

