mtrajano/simple-excel

A wrapper around the phpexcel package, that gives it array access and some extra features

dev-master 2017-05-28 16:10 UTC

This package is auto-updated.

Last update: 2024-04-29 03:38:17 UTC


README

SimpleExcel is a wrapper around the PHPOffice/PHPExcel package that gives it a few extra features. Some of theses features include:

Matrix Array Access

//PHPExcel.php
$workbook = new PHPExcel();
$worksheet = $workbook->getActiveSheet();

$worksheet->setCellValue('A1', 'A test value');
//SimpleExcel.php
$workbook = new Mtrajano\SimpleExcel\Workbook();
$worksheet = $workbook->getActiveSheet();

$worksheet[1]['A'] = 'A test value';

Numeric Column Access

//PHPExcel.php
$worksheet->setCellValue('B1', 'Another test value');
//SimpleExcel.php
$worksheet[1][1] = 'Another test value';

Seamless export

//PHPExcel.php
$writer = new PHPExcel_Writer_Excel2007($workbook);
$writer->save("phpexcel.xlsx");

$writer = new PHPExcel_Writer_Excel5($workbook);
$writer->save("phpexcel.xls");
//SimpleExcel.php
$workbook->save("simple.xlsx", Workbook::WRITE_Excel2007);
$workbook->save("simple.xls", Workbook::WRITE_Excel5);