Cookbook

phpxlsx in a single PHAR file

Warning

The PHAR file is available in the package with support for namespaces. This package is available in the Advanced and Premium licenses.

Advanced and Premium licenses include a PHAR file (http://php.net/manual/en/book.phar.php). It groups the whole of the library in a single file with a PHAR extension that allows to run phpxlsx just by copying it to the project.

The benefit of PHAR files is that it doesn't force the user to copy all single files of phpxlsx, but rather a single PHAR that contains all the functionality of the library.

After copying the PHAR file to the project you can work with it easily. E.g., you can create a new XLSX with a cell content by executing: