Skip to content →

How to install PhpSpreadsheet?

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:

Published in Introduction to PhpSpreadsheet


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.