XLSXExporter Class Reference

Inheritance diagram for XLSXExporter:
Exporter ExporterInterface ExporterInterface

Public Member Functions

 __construct (ExportDataInterface $data, $filename= '', $properties=array())
 getInfo ()
 setTitle ($title)
 setProperties ($properties)
 getProperty ($property_name)
 export ($page_id=NULL)
 compile ($page_id=NULL)
 save ($filename= '', $page_id=NULL)
 formatColumn ($column, $format_code)
 getPHPExcelColumns ()

Protected Attributes

 $extension = '.xlsx'
 $sheets = array()
 $excel

Detailed Description

Class XLSXExporter

http://www.phpexcel.net


Constructor & Destructor Documentation

__construct ( ExportDataInterface data,
filename = '',
properties = array() 
)

Constructor

Parameters:
ExportDataInterface $data
string $filename (Optional) Defaults to ''.
array $properties

Member Function Documentation

compile ( page_id = NULL  ) 

Build $this->output in prep for export/save

This is the main method to be extended for the different exporters

Reimplemented from Exporter.

export ( page_id = NULL  ) 

Returns the PHPExcel object

Returns:
PHPExcel

Reimplemented from Exporter.

formatColumn ( column,
format_code 
)

Format a single column with a number format

You must do this after calling $this->compile!

Parameters:
string $column
string $format_code

  • USD OR PHPExcel_Style_NumberFormat::setFormatCode()
Returns:
$this

Reimplemented from Exporter.

getInfo (  ) 

Return info about this class

Parameters:
type $string description
Returns:
array
  • name string The human name of this exporter
  • descripttion string A further description
  • extension string The file extension used by this class

Reimplemented from Exporter.

getPHPExcelColumns (  ) 

Convert a column key into an excel column, e.g. A, AB, etc.

Parameters:
string $column
Returns:
string
getProperty ( property_name  ) 

Return the value of a single property or NULL

Parameters:
string $property_name e.g. Creator
Returns:
mixed
save ( filename = '',
page_id = NULL 
)

Save as a file to the server

Parameters:
string $filename The correct extension will be appended to this string
mixed $page_id (Optional) Defaults to NULL. Set this to export a single page.

Reimplemented from Exporter.

setProperties ( properties  ) 

Set properties

Parameters:
array $properties

  • Title
  • Creator
  • LastModifiedBy
  • Description
  • Keywords
  • Category
Returns:
$this
setTitle ( title  ) 

Set a title for the exported document

Returns:
$this

Reimplemented from Exporter.


Field Documentation

$excel [protected]
$extension = '.xlsx' [protected]

Reimplemented from Exporter.

$sheets = array() [protected]

The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables

Generated on Fri Jan 17 20:40:34 2014 for Loft Data Grids by  doxygen 1.6.1