2017 © Pedro Peláez
 

library xlsx

xlsx: PHPExcel wrapper

image

k1low/xlsx

xlsx: PHPExcel wrapper

  • Friday, February 24, 2017
  • by k1LoW
  • Repository
  • 2 Watchers
  • 3 Stars
  • 3,246 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 6 Versions
  • 17 % Grown

The README.md

xlsx: PHPExcel wrapper Travis

Usage

<?php
use Xlsx\Xlsx;

$xlsx = new Xlsx();
$xlsx->read('/path/to/template.xlsx')
    ->setValue('testvalue', [
        'col' => 'B',
        'row' => '10',
    ])
    ->setValue('testvalue_with_sheet', [
        'col' => 'B',
        'row' => '10',
        'sheet' => 2,
    ])
    ->setValue('testvalue_with_border', [
        'col' => 'C',
        'row' => '10',
        'border' => [
            'top' => PHPExcel_Style_Border::BORDER_THICK,
            'right' => PHPExcel_Style_Border::BORDER_MEDIUM,
            'left' => PHPExcel_Style_Border::BORDER_THIN,
            'bottom' => PHPExcel_Style_Border::BORDER_DOUBLE,
        ],
    ])
    ->setValue('testvalue_with_border', [
        'col' => 'E',
        'row' => '10',
        'border' => PHPExcel_Style_Border::BORDER_THICK,
    ])
    ->setValue('testvalue_with_color', [
        'col' => 'F',
        'row' => '10',
        'color' => PHPExcel_Style_Color::COLOR_BLUE,
    ])
    ->setValue('testvalue_with_backgroud_color', [
        'col' => 'G',
        'row' => '10',
        'backgroundColor' => PHPExcel_Style_Color::COLOR_YELLOW,
    ])
    ->write('/path/to/output.xlsx');

The Versions