class PHPExcel_Writer_Excel2007 extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter

PHPExcelWriterExcel2007

Copyright (c) 2006 - 2015 PHPExcel

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Methods

boolean
getIncludeCharts()

Write charts in workbook? If this is true, then the Writer will write definitions for any charts that exist in the PHPExcel object.

setIncludeCharts(boolean $pValue = false)

Set write charts in workbook Set to true, to advise the Writer to include any charts that exist in the PHPExcel object.

boolean
getPreCalculateFormulas()

Get Pre-Calculate Formulas flag If this is true (the default), then the writer will recalculate all formulae in a workbook when saving, so that the pre-calculated values are immediately available to MS Excel or other office spreadsheet viewer when opening the file If false, then formulae are not calculated on save. This is faster for saving in PHPExcel, but slower when opening the resulting file in MS Excel, because Excel has to recalculate the formulae itself

setPreCalculateFormulas(boolean $pValue = true)

Set Pre-Calculate Formulas Set to true (the default) to advise the Writer to calculate all formulae on save Set to false to prevent precalculation of formulae on save.

boolean
getUseDiskCaching()

Get use disk caching where possible?

setUseDiskCaching(boolean $pValue = false, string $pDirectory = null)

Set use disk caching where possible?

string
getDiskCachingDirectory()

Get disk caching directory

__construct(PHPExcel $pPHPExcel = null)

Create a new PHPExcelWriterExcel2007

getWriterPart(string $pPartName = '')

Get writer part

save($pFilename = null)

Save PHPExcel to file

getPHPExcel()

Get PHPExcel object

setPHPExcel(PHPExcel $pPHPExcel = null)

Set PHPExcel object

string[]
getStringTable()

Get string table

getStyleHashTable()

Get PHPExcel_Style HashTable

getStylesConditionalHashTable()

Get PHPExcelStyleConditional HashTable

getFillHashTable()

Get PHPExcelStyleFill HashTable

getFontHashTable()

Get PHPExcelStyleFont HashTable

getBordersHashTable()

Get PHPExcelStyleBorders HashTable

getNumFmtHashTable()

Get PHPExcelStyleNumberFormat HashTable

getDrawingHashTable()

Get PHPExcelWorksheetBaseDrawing HashTable

boolean
getOffice2003Compatibility()

Get Office2003 compatibility

setOffice2003Compatibility(boolean $pValue = false)

Set Office2003 compatibility

Details

boolean getIncludeCharts()

Write charts in workbook? If this is true, then the Writer will write definitions for any charts that exist in the PHPExcel object.

If false (the default) it will ignore any charts defined in the PHPExcel object.

Return Value

boolean

PHPExcel_Writer_IWriter setIncludeCharts(boolean $pValue = false)

Set write charts in workbook Set to true, to advise the Writer to include any charts that exist in the PHPExcel object.

Set to false (the default) to ignore charts.

Parameters

boolean $pValue

Return Value

PHPExcel_Writer_IWriter

boolean getPreCalculateFormulas()

Get Pre-Calculate Formulas flag If this is true (the default), then the writer will recalculate all formulae in a workbook when saving, so that the pre-calculated values are immediately available to MS Excel or other office spreadsheet viewer when opening the file If false, then formulae are not calculated on save. This is faster for saving in PHPExcel, but slower when opening the resulting file in MS Excel, because Excel has to recalculate the formulae itself

Return Value

boolean

PHPExcel_Writer_IWriter setPreCalculateFormulas(boolean $pValue = true)

Set Pre-Calculate Formulas Set to true (the default) to advise the Writer to calculate all formulae on save Set to false to prevent precalculation of formulae on save.

Parameters

boolean $pValue Pre-Calculate Formulas?

Return Value

PHPExcel_Writer_IWriter

boolean getUseDiskCaching()

Get use disk caching where possible?

Return Value

boolean

PHPExcel_Writer_Excel2007 setUseDiskCaching(boolean $pValue = false, string $pDirectory = null)

Set use disk caching where possible?

Parameters

boolean $pValue
string $pDirectory Disk caching directory

Return Value

PHPExcel_Writer_Excel2007

Exceptions

PHPExcel_Writer_Exception when directory does not exist

string getDiskCachingDirectory()

Get disk caching directory

Return Value

string

at line 132
__construct(PHPExcel $pPHPExcel = null)

Create a new PHPExcelWriterExcel2007

Parameters

PHPExcel $pPHPExcel

at line 175
PHPExcel_Writer_Excel2007_WriterPart getWriterPart(string $pPartName = '')

Get writer part

Parameters

string $pPartName Writer part name

Return Value

PHPExcel_Writer_Excel2007_WriterPart

at line 190
save($pFilename = null)

Save PHPExcel to file

Parameters

$pFilename

Exceptions

PHPExcel_Writer_Exception

at line 419
PHPExcel getPHPExcel()

Get PHPExcel object

Return Value

PHPExcel

Exceptions

PHPExcel_Writer_Exception

at line 435
PHPExcel_Writer_Excel2007 setPHPExcel(PHPExcel $pPHPExcel = null)

Set PHPExcel object

Parameters

PHPExcel $pPHPExcel PHPExcel object

Return Value

PHPExcel_Writer_Excel2007

Exceptions

PHPExcel_Writer_Exception

at line 446
string[] getStringTable()

Get string table

Return Value

string[]

at line 456
PHPExcel_HashTable getStyleHashTable()

Get PHPExcel_Style HashTable

Return Value

PHPExcel_HashTable

at line 466
PHPExcel_HashTable getStylesConditionalHashTable()

Get PHPExcelStyleConditional HashTable

Return Value

PHPExcel_HashTable

at line 476
PHPExcel_HashTable getFillHashTable()

Get PHPExcelStyleFill HashTable

Return Value

PHPExcel_HashTable

at line 486
PHPExcel_HashTable getFontHashTable()

Get PHPExcelStyleFont HashTable

Return Value

PHPExcel_HashTable

at line 496
PHPExcel_HashTable getBordersHashTable()

Get PHPExcelStyleBorders HashTable

Return Value

PHPExcel_HashTable

at line 506
PHPExcel_HashTable getNumFmtHashTable()

Get PHPExcelStyleNumberFormat HashTable

Return Value

PHPExcel_HashTable

at line 516
PHPExcel_HashTable getDrawingHashTable()

Get PHPExcelWorksheetBaseDrawing HashTable

Return Value

PHPExcel_HashTable

at line 526
boolean getOffice2003Compatibility()

Get Office2003 compatibility

Return Value

boolean

at line 537
PHPExcel_Writer_Excel2007 setOffice2003Compatibility(boolean $pValue = false)

Set Office2003 compatibility

Parameters

boolean $pValue Office2003 compatibility?

Return Value

PHPExcel_Writer_Excel2007