soluble/spreadsheet

PHP Version Build Status Code Coverage Scrutinizer Quality Score Latest Stable Version Total Downloads License

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

Documentation

Installation

Instant installation via composer.

  1. Installing in your PHP project

    console $ php composer require soluble/spreadsheet:0.* Most modern frameworks will include Composer out of the box, but ensure the following file is included: ```php

    <?php // include the Composer autoloader require 'vendor/autoload.php'; ```

  2. 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

Coding standards