I have tried to install the package of phpspreadsheet for both way for github and through composer also but I am unable to install
In composer i am trying these command :- composer require phpoffice/phpspreadsheet but its not working
It’s basically show these type of error:-
[InvalidArgumentException]
Package phpoffice/phpspreadsheet has requirements incompatible with your PHP version, PHP extensions and Composer v
ersion:
– phpoffice/phpspreadsheet 1.19.0 requires ext-gd * but it is not present.
And when i am trying directly for github code its files is not in proper way as the requriement
git hub link:- https://github.com/PHPOffice/PhpSpreadsheet
Question posted in PHP Versions
You can find a list of all versions here.
You can find a list of all versions here.
2
Answers
phpoffice/phpspreadsheet v1.19.0
requiresphp: ^7.3 || ^8.0
Check your installed PHP version by running this command
php -v
. Make sure it’s greater or equal to7.3
.Secondly, make sure that the PHP version declaration in the
composer.json
file is also greater or equal to7.3
. I.e:>= 7.3
, you may want to install a lower version of phpspreadsheet i.ecomposer require phpoffice/phpspreadsheet "^1.8.0"
(requires php: "^5.6|^7.0") instead of adjusting the PHP version in the filecomposer.json
.extension=mbstring
extension=fileinfo
extension=gd
;
) in front of them.Installation
composer require phpoffice/phpspreadsheet "^1.19.0"
What fixed it for me, was
steven7mwesigwa
3rd point.I removed the semicolon in front of the
extension=gd
, and it worked.