The simplest way of installing PHPSpreadSheet is to use Composer.
Here are the requirements for running this library:
- PHP 5.6 (min version)
- PHP extension php_xml enabled
- PHP extension php_gd2 enabled (if not compiled in)
- PHP extension php_zip enabled
The PHP extensions should be already enabled, with a standard PHP installation(I didn’t have to enable any extension when I was installing it for the first time).
To install the library we will use Composer:
If you don’t have composer installed on your current machine, here is a how to install it.
After the process was finished, you can test if it’s working correctly using this simple code:
This should generate a new spreadsheet that looks like this: