Laravel-excel: New installation problem

Created on 4 Aug 2016  路  11Comments  路  Source: Maatwebsite/Laravel-Excel

Please prefix your issue with one of the following: [BUG] [PROPOSAL] [QUESTION].

Package version, Laravel version

2.1.0
laravel 5.2

Expected behaviour

When cloning from git with config/excel.php, composer install should work as usual

Actual behaviour

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

Exception stack trace

Screenshot of Excel file

Steps to reproduce the behaviour

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...

All 11 comments

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amine8ghandi8amine picture amine8ghandi8amine  路  3Comments

pamekar picture pamekar  路  3Comments

thearabbit picture thearabbit  路  3Comments

daraghoshea picture daraghoshea  路  3Comments

rossjcooper picture rossjcooper  路  3Comments