soluble / spreadsheet
Soluble spreadsheet
Requires
- php: >=5.4.4
Suggests
- ext-php_excel: LibXL and https://github.com/iliaal/php_excel
README
Introduction
soluble-spreadsheet provides a generic wrapper for generating excel documents in PHP.
Warning: soluble-spreadsheet is currently a proof of concept and is limited to the libxl/php_excel extension wrapper. In the future it should be possible to exchange the underlying driver between PHPExcel, native LibXL, Spout or any future implementations without loosing compatibility. PR's and ideas are welcome.
Requirements
- PHP 5.5+ or 7.0+
- libxl php extension
Documentation
- Manual in progress and API documentation available.
Installation
Instant installation via composer.
-
Installing in your PHP project
$ php composer require soluble/spreadsheet:0.*
Most modern frameworks will include Composer out of the box, but ensure the following file is included:
<?php // include the Composer autoloader require 'vendor/autoload.php';
-
Installing libXL / php_excel extension
Take a look to the install the libxl / php_excel extension document.
Examples
Create an excel file
<?php use Soluble\Spreadsheet\Library\LibXL; $libxl = new LibXL($valid_license); $bookXLS = $libxl->getExcelBook(LibXL::FILE_FORMAT_XLS); $bookXLSX = $libxl->getExcelBook(LibXL::FILE_FORMAT_XLSX);
Supported drivers (state)
Name | Language | License | Support |
---|---|---|---|
libXL/php_excel | C (fast) | Commercial | Initial support |
PHPExcel | PHP (slow) | Opensource | Not yet implemented |
Spout | PHP (medium) | Opensource | Not yet implemented |
POI | Java (fast) | Opensource | Not yet implemented |
Contributing
Contribution are welcome see contribution guide