Please prefix your issue with one of the following: [BUG] [PROPOSAL] [QUESTION].
2.1.0
laravel 5.2
When cloning from git with config/excel.php, composer install should work as usual
its throwing errors
> Illuminate\Foundation\ComposerScripts::postInstall
> php artisan optimize
Fatal error: Class 'PHPExcel_Shared_Font' not found in D:\xampp\htdocs\mailer\config\excel.php on line 182
PHP Fatal error: Class 'PHPExcel_Shared_Font' not found in D:\xampp\htdocs\mailer\config\excel.php on line 182
Script php artisan optimize handling the post-install-cmd event returned with an error
[RuntimeException]
Error Output: PHP Fatal error: Class 'PHPExcel_Shared_Font' not found in D
:\xampp\htdocs\mailer\config\excel.php on line 182
Somehow it's searching for the config file you probably haven't published yet. Try to publish the file and then run another composer install
but without installing (its a fresh install so laravel also not installed yet so php artisan doesn't work)
we can't publish config
I would suggest to check the vendor\phpoffice\phpexcel folder if it couldn't install the laravelpanel completely. Comment the line 'autosize-method' =>PHPExcel_Shared_Font::AUTOSIZE_METHOD_APPROX, and run "composer require phpoffice/phpexcel". phpexcel will be published then comment out the line...
Same error:
I would suggest to check the vendor\phpoffice\phpexcel
Uploaded that and its fine thanks I didn't know what I missed.
This error happened to me when I was updating the version of Laravel-Excel.
I updated the composer, but it does not delete the package settings in config/excel.php.
In this file there should not be an index [autosize-method].
Updating the package should never touch your config/excel.php . Closing this ticket as the original issue was resolved a long time ago.
I ran into a similar problem installing a new server with my app:
`
composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Package phpoffice/phpexcel is abandoned, you should avoid using it. Use phpoffice/phpspreadsheet instead.
Package raven/raven is abandoned, you should avoid using it. Use sentry/sentry instead.
Generating autoload files
Warning: Ambiguous class resolution, "CreateAuthTokenTable" was found in both "$baseDir . '/app/database/migrations/2013_05_12_014954_create_auth_token_table.php" and "/home/4geeks/golfitrion_backend/laravel/vendor/tappleby/laravel-auth-token/src/migrations/2013_05_12_014954_create_auth_token_table.php", the first will be used.
php artisan clear-compiled
PHP Fatal error: Class 'PHPExcel_Shared_Font' not found in /home/4geeks/golfitrion_backend/laravel/vendor/maatwebsite/excel/src/Maatwebsite/Excel/ExcelServiceProvider.php on line 220
{"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","message":"Class 'PHPExcel_Shared_Font' not found","file":"\/home\/4geeks\/golfitrion_backend\/laravel\/vendor\/maatwebsite\/excel\/src\/Maatwebsite\/Excel\/ExcelServiceProvider.php","line":220}}Script php artisan clear-compiled handling the post-install-cmd event returned with error code 255
[4geeks@vps-1052430-x laravel]$
`
Just ran into this issue twice after installing mattexcel 2.1 in two different servers. Should check if it can be patched in 2.1
I have similar problem how @zardilior in new installation server. Please provide ti reopen issue and fix for 2.1 patch. Thanks.
My error in a remote:
Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Class 'PHPExcel_Shared_Font' not found in .../config/excel.php:182
In my local Homestead work fine.
Version 2.1 is no longer supported
https://laravel-excel.maatwebsite.nl/3.1/getting-started/support.html
I would suggest to check the vendor\phpoffice\phpexcel folder if it couldn't install the laravelpanel completely. Comment the line 'autosize-method' =>PHPExcel_Shared_Font::AUTOSIZE_METHOD_APPROX, and run "composer require phpoffice/phpexcel". phpexcel will be published then comment out the line...
It worked for me.. Thanks
Most helpful comment
I would suggest to check the vendor\phpoffice\phpexcel folder if it couldn't install the laravelpanel completely. Comment the line 'autosize-method' =>PHPExcel_Shared_Font::AUTOSIZE_METHOD_APPROX, and run "composer require phpoffice/phpexcel". phpexcel will be published then comment out the line...