Overview

Packages

  • JAMA
  • None
  • PHP
  • PHPExcel
    • CachedObjectStorage
    • Calculation
    • Cell
    • Chart
      • Renderer
    • Reader
      • Excel2007
      • Excel5
    • RichText
    • Settings
    • Shared
      • Escher
      • OLE
      • Trend
      • ZipArchive
    • Style
    • Worksheet
      • Drawing
    • Writer
      • 2007
      • CSV
      • Excel2007
      • Excel5
      • HTML
      • PDF

Classes

  • PHPExcel_Writer_Excel5
  • PHPExcel_Writer_Excel5_BIFFwriter
  • PHPExcel_Writer_Excel5_Escher
  • PHPExcel_Writer_Excel5_Font
  • PHPExcel_Writer_Excel5_Parser
  • PHPExcel_Writer_Excel5_Workbook
  • PHPExcel_Writer_Excel5_Worksheet
  • PHPExcel_Writer_Excel5_Xf
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

Class PHPExcel_Writer_Excel5_Workbook

PHPExcel_Writer_Excel5_Workbook

PHPExcel_Writer_Excel5_BIFFwriter
Extended by PHPExcel_Writer_Excel5_Workbook
Package: PHPExcel\Writer\Excel5
Category: PHPExcel
Copyright: Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
License: LGPL
Located at controlador/include/phpexcel/PHPExcel/Writer/Excel5/Workbook.php
Methods summary
public
# __construct( PHPExcel $phpExcel, integer & $str_total, integer & $str_unique, array & $str_table, array & $colors, mixed $parser )

Class constructor

Class constructor

Parameters

$phpExcel
The Workbook
$str_total
$str_total Total number of strings
$str_unique
$str_unique Total number of unique strings
$str_table
$str_table String Table
$colors
$colors Colour Table
$parser
The formula parser created for the Workbook

Overrides

PHPExcel_Writer_Excel5_BIFFwriter::__construct()
public integer
# addXfWriter( PHPExcel_Style $style, boolean $isStyleXf = false )

Add a new XF writer

Add a new XF writer

Parameters

$style
$isStyleXf
it a style XF?

Returns

integer
Index to XF record
public integer
# _addFont( PHPExcel_Style_Font $font )

Add a font to added fonts

Add a font to added fonts

Parameters

$font

Returns

integer
Index to FONT record
private integer
# _addColor( string $rgb )

Alter color palette adding a custom color

Alter color palette adding a custom color

Parameters

$rgb
E.g. 'FF00AA'

Returns

integer
Color index
public
# _setPaletteXl97( )

Sets the colour palette to the Excel 97+ default.

Sets the colour palette to the Excel 97+ default.

public string
# writeWorkbook( array $pWorksheetSizes = null )

Assemble worksheets into a workbook and send the BIFF data to an OLE storage.

Assemble worksheets into a workbook and send the BIFF data to an OLE storage.

Parameters

$pWorksheetSizes
The sizes in bytes of the binary worksheet streams

Returns

string
Binary data for workbook stream
public
# _calcSheetOffsets( )

Calculate offsets for Worksheet BOF records.

Calculate offsets for Worksheet BOF records.

private
# _writeAllFonts( )

Store the Excel FONT records.

Store the Excel FONT records.

private
# _writeAllNumFormats( )

Store user defined numerical formats i.e. FORMAT records

Store user defined numerical formats i.e. FORMAT records

private
# _writeAllXfs( )

Write all XF records.

Write all XF records.

private
# _writeAllStyles( )

Write all STYLE records.

Write all STYLE records.

private
# _writeExterns( )

Write the EXTERNCOUNT and EXTERNSHEET records. These are used as indexes for the NAME records.

Write the EXTERNCOUNT and EXTERNSHEET records. These are used as indexes for the NAME records.

private
# _writeNames( )

Write the NAME record to define the print area and the repeat rows and cols.

Write the NAME record to define the print area and the repeat rows and cols.

private
# _writeAllDefinedNamesBiff8( )

Writes all the DEFINEDNAME records (BIFF8). So far this is only used for repeating rows/columns (print titles) and print areas

Writes all the DEFINEDNAME records (BIFF8). So far this is only used for repeating rows/columns (print titles) and print areas

private string
# _writeDefinedNameBiff8( string $name, string $formulaData, string $sheetIndex = 0, boolean $isBuiltIn = false )

Write a DEFINEDNAME record for BIFF8 using explicit binary formula data

Write a DEFINEDNAME record for BIFF8 using explicit binary formula data

Parameters

$name
The name in UTF-8
$formulaData
The binary formula data
$sheetIndex
1-based sheet index the defined name applies to. 0 = global
$isBuiltIn
Built-in name?

Returns

string
Complete binary record data
private string
# _writeShortNameBiff8( string $name, string $sheetIndex, integer[][] $rangeBounds, boolean $isHidden = false )

Write a short NAME record

Write a short NAME record

Parameters

$name
$sheetIndex
1-based sheet index the defined name applies to. 0 = global
$rangeBounds
range boundaries
$isHidden

Returns

string
Complete binary record data
private
# _writeCodepage( )

Stores the CODEPAGE biff record.

Stores the CODEPAGE biff record.

private
# _writeWindow1( )

Write Excel BIFF WINDOW1 record.

Write Excel BIFF WINDOW1 record.

private
# _writeBoundsheet( PHPExcel_Worksheet $sheet, integer $offset )

Writes Excel BIFF BOUNDSHEET record.

Writes Excel BIFF BOUNDSHEET record.

Parameters

$sheet
Worksheet name
$offset
Location of worksheet BOF
private
# _writeSupbookInternal( )

Write Internal SUPBOOK record

Write Internal SUPBOOK record

private
# _writeExternsheetBiff8( )

Writes the Excel BIFF EXTERNSHEET record. These references are used by formulas.

Writes the Excel BIFF EXTERNSHEET record. These references are used by formulas.

private
# _writeStyle( )

Write Excel BIFF STYLE records.

Write Excel BIFF STYLE records.

private
# _writeNumFormat( string $format, integer $ifmt )

Writes Excel FORMAT record for non "built-in" numerical formats.

Writes Excel FORMAT record for non "built-in" numerical formats.

Parameters

$format
Custom format string
$ifmt
Format index code
private
# _writeDatemode( )

Write DATEMODE record to indicate the date system in use (1904 or 1900).

Write DATEMODE record to indicate the date system in use (1904 or 1900).

private
# _writeExterncount( integer $cxals )

Write BIFF record EXTERNCOUNT to indicate the number of external sheet references in the workbook.

Write BIFF record EXTERNCOUNT to indicate the number of external sheet references in the workbook.

Excel only stores references to external sheets that are used in NAME. The workbook NAME record is required to define the print area and the repeat rows and columns.

A similar method is used in Worksheet.php for a slightly different purpose.

Parameters

$cxals
Number of external references
private
# _writeExternsheet( string $sheetname )

Writes the Excel BIFF EXTERNSHEET record. These references are used by formulas. NAME record is required to define the print area and the repeat rows and columns.

Writes the Excel BIFF EXTERNSHEET record. These references are used by formulas. NAME record is required to define the print area and the repeat rows and columns.

A similar method is used in Worksheet.php for a slightly different purpose.

Parameters

$sheetname
Worksheet name
private
# _writeNameShort( integer $index, integer $type, integer $rowmin, integer $rowmax, integer $colmin, integer $colmax )

Store the NAME record in the short format that is used for storing the print area, repeat rows only and repeat columns only.

Store the NAME record in the short format that is used for storing the print area, repeat rows only and repeat columns only.

Parameters

$index
Sheet index
$type
Built-in name type
$rowmin
Start row
$rowmax
End row
$colmin
Start colum
$colmax
End column
private
# _writeNameLong( integer $index, integer $type, integer $rowmin, integer $rowmax, integer $colmin, integer $colmax )

Store the NAME record in the long format that is used for storing the repeat rows and columns when both are specified. This shares a lot of code with _writeNameShort() but we use a separate method to keep the code clean. Code abstraction for reuse can be carried too far, and I should know. ;-)

Store the NAME record in the long format that is used for storing the repeat rows and columns when both are specified. This shares a lot of code with _writeNameShort() but we use a separate method to keep the code clean. Code abstraction for reuse can be carried too far, and I should know. ;-)

Parameters

$index
Sheet index
$type
Built-in name type
$rowmin
Start row
$rowmax
End row
$colmin
Start colum
$colmax
End column
private string
# _writeCountry( )

Stores the COUNTRY record for localization

Stores the COUNTRY record for localization

Returns

string
private string
# _writeRecalcId( )

Write the RECALCID record

Write the RECALCID record

Returns

string
private
# _writePalette( )

Stores the PALETTE biff record.

Stores the PALETTE biff record.

private string
# _writeSharedStringsTable( )

Handling of the SST continue blocks is complicated by the need to include an additional continuation byte depending on whether the string is split between blocks or whether it starts at the beginning of the block. (There are also additional complications that will arise later when/if Rich Strings are supported).

Handling of the SST continue blocks is complicated by the need to include an additional continuation byte depending on whether the string is split between blocks or whether it starts at the beginning of the block. (There are also additional complications that will arise later when/if Rich Strings are supported).

The Excel documentation says that the SST record should be followed by an EXTSST record. The EXTSST record is a hash table that is used to optimise access to SST. However, despite the documentation it doesn't seem to be required so we will ignore it.

Returns

string
Binary data
private
# _writeMsoDrawingGroup( )

Writes the MSODRAWINGGROUP record if needed. Possibly split using CONTINUE records.

Writes the MSODRAWINGGROUP record if needed. Possibly split using CONTINUE records.

public PHPExcel_Shared_Escher
# getEscher( )

Get Escher object

Get Escher object

Returns

PHPExcel_Shared_Escher
public
# setEscher( PHPExcel_Shared_Escher $pValue = null )

Set Escher object

Set Escher object

Parameters

$pValue
Methods inherited from PHPExcel_Writer_Excel5_BIFFwriter
_addContinue(), _append(), _storeBof(), _storeEof(), getByteOrder(), writeData(), writeEof()
Properties summary
private PHPExcel_Writer_Excel5_Parser $_parser

Formula parser

Formula parser

#
public integer $_biffsize

The BIFF file size for the workbook.

The BIFF file size for the workbook.

See

PHPExcel_Writer_Excel5_Workbook::_calcSheetOffsets()
#
private PHPExcel_Writer_Excel5_Xf[] $_xfWriters

XF Writers

XF Writers

# array()
public array $_palette

Array containing the colour palette

Array containing the colour palette

#
public integer $_codepage

The codepage indicates the text encoding used for strings

The codepage indicates the text encoding used for strings

#
public integer $_country_code

The country code used for localization

The country code used for localization

#
private PHPExcel $_phpExcel

Workbook

Workbook

#
private PHPExcel_Writer_Excel5_Font[] $_fontWriters

Fonts writers

Fonts writers

# array()
private array $_addedFonts

Added fonts. Maps from font's hash => index in workbook

Added fonts. Maps from font's hash => index in workbook

# array()
private array $_numberFormats

Shared number formats

Shared number formats

# array()
private array $_addedNumberFormats

Added number formats. Maps from numberFormat's hash => index in workbook

Added number formats. Maps from numberFormat's hash => index in workbook

# array()
private array $_worksheetSizes

Sizes of the binary worksheet streams

Sizes of the binary worksheet streams

# array()
private array $_worksheetOffsets

Offsets of the binary worksheet streams relative to the start of the global workbook stream

Offsets of the binary worksheet streams relative to the start of the global workbook stream

# array()
private integer $_str_total

Total number of shared strings in workbook

Total number of shared strings in workbook

#
private integer $_str_unique

Number of unique shared strings in workbook

Number of unique shared strings in workbook

#
private array $_str_table

Array of unique shared strings in workbook

Array of unique shared strings in workbook

#
private $_colors

Color cache

Color cache

#
private PHPExcel_Shared_Escher $_escher

Escher object corresponding to MSODRAWINGGROUP

Escher object corresponding to MSODRAWINGGROUP

#
Properties inherited from PHPExcel_Writer_Excel5_BIFFwriter
$_data, $_datasize, $_limit
Autene API documentation generated by ApiGen