2017 © Pedro Peláez
 

library phpexcel

A simple wrapper around phpexcel

image

duncan3dc/phpexcel

A simple wrapper around phpexcel

  • Sunday, August 6, 2017
  • by duncan3dc
  • Repository
  • 2 Watchers
  • 1 Stars
  • 68,792 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

phpexcel

A simple wrapper around the PHPExcel library, (*1)

Latest Stable Version Build Status Coverage Status, (*2)

Static Methods

  • read(string $filename[, mixed $key]): array - Reads a spreadsheet and converts it's contents to an array (using the PHPExcel toString() method). By default this will return an enumerated array with each element representing one sheet. A specific sheet can be requested by passing the $key argument, either as an integer representing the (zero based) sheet number, or as a string of the sheet name.
  • getCellName(int $col, int $row): string - Convert a numeric column number (zero based) and row number into a cell name (eg B3)

Public Methods

  • save(string $filename): null - Calls the save() method on the PHPExcel_Writer_Excel2007 class.
  • output(string $filename): null - Outputs the spreadsheet to the browser to prompt a download.
  • addImage(string $cell, string $path): null - Add an image to the specified cell.
  • setCell(string $cell, mixed $value[, int $style]): null - Set a cell to a value. The $style parameter can be used to set several styles on the cell, using the following class constants: BOLD ITALIC LEFT RIGHT CENTER

Examples

The Excel class uses a namespace of duncan3dc, (*3)

use duncan3dc\Excel;

$excel = new Excel();

$excel->setCell("A1","Title", Excel::BOLD | EXCEL::CENTER);

for($i = 1; $i < 10; $i++) {
    $cell = $excel->getCellName($i,1);
    $excel->setCell($cell,"Test " . $i);
}

for($i = 1; $i < 10; $i++) {
    $cell = Excel::getCellName($i,2);
    $excel->setCell($cell,"Value " . $i);
}

$excel->save("/tmp/text.xls");

The Versions

06/08 2017

dev-master

9999999-dev https://github.com/duncan3dc/phpexcel

A simple wrapper around phpexcel

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

excel simple phpexcel speadsheet

30/09 2016

1.3.0

1.3.0.0 https://github.com/duncan3dc/phpexcel

A simple wrapper around phpexcel

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

excel simple phpexcel speadsheet

15/03 2015

1.2.0

1.2.0.0 https://github.com/duncan3dc/phpexcel

A simple wrapper around phpexcel

  Sources   Download

Apache-2.0

The Requires

 

excel simple phpexcel speadsheet

27/08 2014

1.1.2

1.1.2.0 https://github.com/duncan3dc/phpexcel

A simple wrapper around phpexcel

  Sources   Download

Apache-2.0

The Requires

 

excel simple phpexcel speadsheet

23/06 2014

1.1.1

1.1.1.0 https://github.com/duncan3dc/phpexcel

A simple wrapper around phpexcel

  Sources   Download

Apache-2.0

The Requires

 

excel simple phpexcel speadsheet

23/06 2014

1.1.0

1.1.0.0 https://github.com/duncan3dc/phpexcel

A simple wrapper around phpexcel

  Sources   Download

Apache-2.0

The Requires

 

excel simple phpexcel speadsheet

19/06 2014

1.0.1

1.0.1.0 https://github.com/duncan3dc/phpexcel

A simple wrapper around phpexcel

  Sources   Download

Apache-2.0

The Requires

 

excel simple phpexcel speadsheet

03/06 2014

1.0.0

1.0.0.0 https://github.com/duncan3dc/phpexcel

A simple wrapper around phpexcel

  Sources   Download

Apache-2.0

The Requires

 

excel simple phpexcel speadsheet