Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install maatwebsite/excel?

I'm trying to install maatwebsite/excel; however, I can't get it to work.

I tried deleting the composer.lock file and running:

composer install
composer update

I also tried:

composer require maatwebsite/excel --update-with-dependencies

Neither method worked.

The error I received was:

Problem 1
- maatwebsite/excel 3.1.10 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
- maatwebsite/excel 3.1.11 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
- maatwebsite/excel 3.1.12 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
- maatwebsite/excel 3.1.13 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
 .
 .
 .
 .

- maatwebsite/excel 3.1.14 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
- maatwebsite/excel 3.1.15 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].   
- Installation request for maatwebsite/excel ^3.1 -> satisfiable by maatwebsite/excel[3.1.0, 3.1.1, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.14, 3.1.15, 3.1.16, 3.1.17, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.1.x-dev, 3.2.x-dev].

To enable extensions, verify that they are enabled in your .ini files:
- C:\Users\user\Downloads\php-7.3.8-nts-Win32-VC15-x64\php.ini
You can also run `php --ini` inside terminal to see which files are used 
by PHP in CLI mode.

Installation failed, reverting ./composer.json to its original content.
like image 416
su3158 Avatar asked Oct 01 '19 06:10

su3158


1 Answers

Apparently, it was a dependency error. To ignore this dependency requirement run:

composer require maatwebsite/excel --ignore-platform-reqs
like image 62
su3158 Avatar answered Oct 09 '22 13:10

su3158