Laravel-excel: Class 'PHPExcel_Shared_Font' not found

Created on 8 May 2018  ·  12Comments  ·  Source: Maatwebsite/Laravel-Excel

Versions

"php": ">=7.1.0",
"laravel/framework": "5.6.*",
"maatwebsite/excel": "~3.0.5"

while doing composer install as well as while doing composer update

Error

In excel.php line 182:
Class 'PHPExcel_Shared_Font' not found

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1

question

Most helpful comment

@ds-manish did you upgrade from 2.1? You'll have to delete your config/excel.php and re-publish it. As the version 2.1 config uses PHPExcel classes instead of PhpSpreadsheet.

All 12 comments

@ds-manish did you upgrade from 2.1? You'll have to delete your config/excel.php and re-publish it. As the version 2.1 config uses PHPExcel classes instead of PhpSpreadsheet.

@patrickbrouwers Its working! Thank you!

@ds-manish did you upgrade from 2.1? You'll have to delete your config/excel.php and re-publish it. As the version 2.1 config uses PHPExcel classes instead of PhpSpreadsheet.

How can I re-publish it?

@famarojr

From installation:

php artisan vendor:publish --provider=Maatwebsite\Excel\ExcelServiceProvider

Thank you. Now, I have this return:

There are no commands defined in the "iseed" namespace.

Thank you, solved my problem.

@famarojr

From installation:

php artisan vendor:publish --provider=Maatwebsite\Excel\ExcelServiceProvider

after using this command getting Class 'Arrilot\Widgets\ServiceProvider' not found this error.

after using this command getting Class 'Arrilot\Widgets\ServiceProvider' not found this error.

Doesn't sound related to Laravel-Excel in my opinion.

None of the options are working to me.

I have a clear laravel installation, and when I try to access I get the error Class 'PHPExcel_Shared_Font' not found

None of the options are working to me.

I have a clear laravel installation, and when I try to access I get the error Class 'PHPExcel_Shared_Font' not found

Could you please share your versions of PHP, Laravel and Laravel Excel? Thanks!

@famarojr

From installation:

php artisan vendor:publish --provider=Maatwebsite\Excel\ExcelServiceProvider

Thank you for this suggestion, everything working now.

If anyone is getting the error

Unable to locate publishable resources.

you need to put quotation marks in provider:

php artisan vendor:publish --provider="Maatwebsite\Excel\ExcelServiceProvider"

Was this page helpful?
0 / 5 - 0 ratings