PHPExcel_Writer_Excel5_Writer
[ class tree: PHPExcel_Writer_Excel5_Writer ] [ index: PHPExcel_Writer_Excel5_Writer ] [ all elements ]

Class: PHPExcel_Writer_Excel5_Workbook

Source Location: /PHPExcel/Writer/Excel5/Workbook.php

Class Overview

PHPExcel_Writer_Excel5_BIFFwriter
   |
   --PHPExcel_Writer_Excel5_Workbook

Class for generating Excel Spreadsheets


Author(s):

Variables

Methods


Child classes:

PHPExcel_Writer_Excel5_Writer
Class for writing Excel Spreadsheets.

Inherited Variables

Inherited Methods

Class: PHPExcel_Writer_Excel5_BIFFwriter

PHPExcel_Writer_Excel5_BIFFwriter::PHPExcel_Writer_Excel5_BIFFwriter()
Constructor
PHPExcel_Writer_Excel5_BIFFwriter::writeData()
General storage function like _append and _prepend, but returns string instead of modifying $this->_data
PHPExcel_Writer_Excel5_BIFFwriter::writeEof()
Writes Excel EOF record to indicate the end of a BIFF stream.
PHPExcel_Writer_Excel5_BIFFwriter::_addContinue()
Excel limits the size of BIFF records. Excel 97 the limit is 8228 bytes. must be split up into CONTINUE blocks.
PHPExcel_Writer_Excel5_BIFFwriter::_append()
General storage function
PHPExcel_Writer_Excel5_BIFFwriter::_prepend()
General storage function
PHPExcel_Writer_Excel5_BIFFwriter::_setByteOrder()
Determine the byte order and store it as class data to avoid recalculating it for each call to new().
PHPExcel_Writer_Excel5_BIFFwriter::_storeBof()
Writes Excel BOF record to indicate the beginning of a stream or sub-stream in the BIFF file.
PHPExcel_Writer_Excel5_BIFFwriter::_storeEof()
Writes Excel EOF record to indicate the end of a BIFF stream.

Class Details

[line 51]
Class for generating Excel Spreadsheets

Class for generating Excel Spreadsheets




Tags:

author:  Xavier Noguer <xnoguer@rezebra.com>


[ Top ]


Class Variables

$_1904 =

[line 69]

Flag for 1904 date system (0 => base date is 1900, 1 => base date is 1904)

Flag for 1904 date system (0 => base date is 1900, 1 => base date is 1904)




Tags:

access:  private

Type:   integer


[ Top ]

$_activesheet =

[line 75]

The active worksheet of the workbook (0 indexed)

The active worksheet of the workbook (0 indexed)




Tags:

access:  private

Type:   integer


[ Top ]

$_biff8_input_encoding =  'UTF-16LE'

[line 308]



Tags:

access:  private

Type:   mixed


[ Top ]

$_biffsize =

[line 107]

The BIFF file size for the workbook.

The BIFF file size for the workbook.




Tags:


Type:   integer


[ Top ]

$_codepage =

[line 155]

The codepage indicates the text encoding used for strings

The codepage indicates the text encoding used for strings




Tags:

access:  private

Type:   integer


[ Top ]

$_country_code =

[line 161]

The country code used for localization

The country code used for localization




Tags:

access:  private

Type:   integer


[ Top ]

$_fileclosed =

[line 100]

Flag for preventing close from being called twice.

Flag for preventing close from being called twice.




Tags:

see:  PHPExcel_Writer_Excel5_Workbook::close()
access:  private

Type:   integer


[ Top ]

$_filename =

[line 57]

Filename for the Workbook

Filename for the Workbook




Tags:

access:  private

Type:   string


[ Top ]

$_firstsheet =

[line 81]

1st displayed worksheet in the workbook (0 indexed)

1st displayed worksheet in the workbook (0 indexed)




Tags:

access:  private

Type:   integer


[ Top ]

$_formats =

[line 137]

Array containing references to all of this workbook's formats

Array containing references to all of this workbook's formats




Tags:

access:  private

Type:   array


[ Top ]

$_palette =

[line 143]

Array containing the colour palette

Array containing the colour palette




Tags:

access:  private

Type:   array


[ Top ]

$_parser =

[line 63]

Formula parser

Formula parser




Tags:

access:  private

Type:   object Parser


[ Top ]

$_selected =

[line 87]

Number of workbook tabs selected

Number of workbook tabs selected




Tags:

access:  private

Type:   integer


[ Top ]

$_sheetname =

[line 113]

The default sheetname for all sheets created.

The default sheetname for all sheets created.




Tags:

access:  private

Type:   string


[ Top ]

$_sheetnames =

[line 131]

Array of sheetnames for creating the EXTERNSHEET records

Array of sheetnames for creating the EXTERNSHEET records




Tags:

access:  private

Type:   array


[ Top ]

$_string_sizeinfo_size =

[line 173]

number of bytes for sizeinfo of strings

number of bytes for sizeinfo of strings




Tags:

access:  private

Type:   integer


[ Top ]

$_tmp_dir =

[line 167]

The temporary dir for storing the OLE file

The temporary dir for storing the OLE file




Tags:

access:  private

Type:   string


[ Top ]

$_tmp_format =

[line 119]

The default XF format.

The default XF format.




Tags:

access:  private

Type:   object Format


[ Top ]

$_url_format =

[line 149]

The default format for URLs.

The default format for URLs.




Tags:

access:  private

Type:   object Format


[ Top ]

$_worksheets =

[line 125]

Array containing references to all of this workbook's worksheets

Array containing references to all of this workbook's worksheets




Tags:

access:  private

Type:   array


[ Top ]

$_xf_index =

[line 93]

Index for creating adding new formats to the workbook

Index for creating adding new formats to the workbook




Tags:

access:  private

Type:   integer


[ Top ]



Class Methods


constructor PHPExcel_Writer_Excel5_Workbook [line 181]

PHPExcel_Writer_Excel5_Workbook PHPExcel_Writer_Excel5_Workbook( string $filename)

Class constructor

Class constructor




Tags:

access:  public


Parameters:

string   $filename   filename for storing the workbook. "-" for writing to stdout.

[ Top ]

method addFormat [line 378]

&PHPExcel_Writer_Excel5_Format &addFormat( [array $properties = array()])

Add a new format to the Excel workbook.

Add a new format to the Excel workbook. Also, pass any properties to the Format constructor.




Tags:

return:  reference to an Excel Format
access:  public


Parameters:

array   $properties   array with properties for initializing the format.

[ Top ]

method addWorksheet [line 322]

mixed &addWorksheet( [string $name = ''])

Add a new worksheet to the Excel workbook.

Add a new worksheet to the Excel workbook. If no name is given the name of the worksheet will be Sheeti$i, with $i in [1..].




Tags:

return:  reference to a worksheet object on success
access:  public


Parameters:

string   $name   the optional name of the worksheet

[ Top ]

method close [line 221]

mixed close( )

Calls finalization methods.

Calls finalization methods. This method should always be the last one to be called on every workbook




Tags:

return:  true on success
access:  public


[ Top ]

method setBIFF8InputEncoding [line 309]

void setBIFF8InputEncoding( $encoding)



Parameters:

   $encoding  

[ Top ]

method setCountry [line 303]

void setCountry( integer $code)

Set the country identifier for the workbook

Set the country identifier for the workbook




Tags:

access:  public


Parameters:

integer   $code   Is the international calling country code for the chosen country.

[ Top ]

method setCustomColor [line 396]

integer setCustomColor( integer $index, integer $red, integer $green, integer $blue)

Change the RGB components of the elements in the colour palette.

Change the RGB components of the elements in the colour palette.




Tags:

return:  The palette index for the custom color
access:  public


Parameters:

integer   $index   colour index
integer   $red   red RGB value [0-255]
integer   $green   green RGB value [0-255]
integer   $blue   blue RGB value [0-255]

[ Top ]

method setTempDir [line 578]

true setTempDir( string $dir)

Sets the temp dir used for storing the OLE file

Sets the temp dir used for storing the OLE file




Tags:

return:  if given dir is valid, false otherwise
access:  public


Parameters:

string   $dir   The dir to be used as temp dir

[ Top ]

method setVersion [line 270]

void setVersion( integer $version)

Sets the BIFF version.

Sets the BIFF version. This method exists just to access experimental functionality from BIFF8. It will be deprecated ! Only possible value is 8 (Excel 97/2000). For any other value it fails silently.




Tags:

access:  public


Parameters:

integer   $version   The BIFF version

[ Top ]

method sheets [line 243]

array sheets( )

An accessor for the _worksheets[] array

An accessor for the _worksheets[] array Returns an array of the worksheet objects in a workbook It actually calls to worksheets()




Tags:



[ Top ]

method worksheets [line 255]

array worksheets( )

An accessor for the _worksheets[] array.

An accessor for the _worksheets[] array. Returns an array of the worksheet objects in a workbook




Tags:

access:  public


[ Top ]

method writeAllDefinedNamesBiff8 [line 880]

void writeAllDefinedNamesBiff8( )

Writes all the DEFINEDNAME records (BIFF8).

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




Tags:

access:  public


[ Top ]

method writeCountry [line 1363]

string writeCountry( )

Stores the COUNTRY record for localization

Stores the COUNTRY record for localization




Tags:

access:  public


[ Top ]

method writeDefinedNameBiff8 [line 938]

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




Tags:

return:  Complete binary record data
access:  public


Parameters:

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

[ Top ]

method writeExternsheetBiff8 [line 1077]

void writeExternsheetBiff8( string $sheetname)

Writes the Excel BIFF EXTERNSHEET record. formulas.

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




Tags:

access:  public


Parameters:

string   $sheetname   Worksheet name

[ Top ]

method writeSharedStringsTable [line 1555]

void writeSharedStringsTable( )

Write all of the workbooks strings into an indexed array.

Write all of the workbooks strings into an indexed array. See the comments in _calculate_shared_string_sizes() for more information. 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.




Tags:

access:  public


[ Top ]

method writeSupbookInternal [line 1058]

void writeSupbookInternal( )

Write Internal SUPBOOK record

Write Internal SUPBOOK record




Tags:

access:  public


[ Top ]

method _calcSheetOffsets [line 623]

void _calcSheetOffsets( )

Calculate offsets for Worksheet BOF records.

Calculate offsets for Worksheet BOF records.




Tags:

access:  private


[ Top ]

method _calculateSharedStringsSizes [line 1410]

void _calculateSharedStringsSizes( )

Calculate 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. additional complications that will arise later when/if Rich Strings are supported).

Calculate 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).




Tags:

access:  private


[ Top ]

method _setPaletteXl97 [line 429]

void _setPaletteXl97( )

Sets the colour palette to the Excel 97+ default.

Sets the colour palette to the Excel 97+ default.




Tags:

access:  private


[ Top ]

method _storeAllFonts [line 663]

void _storeAllFonts( )

Store the Excel FONT records.

Store the Excel FONT records.




Tags:

access:  private


[ Top ]

method _storeAllNumFormats [line 707]

void _storeAllNumFormats( )

Store user defined numerical formats i.

Store user defined numerical formats i.e. FORMAT records




Tags:

access:  private


[ Top ]

method _storeAllStyles [line 782]

void _storeAllStyles( )

Write all STYLE records.

Write all STYLE records.




Tags:

access:  private


[ Top ]

method _storeAllXfs [line 755]

void _storeAllXfs( )

Write all XF records.

Write all XF records.




Tags:

access:  private


[ Top ]

method _storeBoundsheet [line 1029]

void _storeBoundsheet( string $sheetname, integer $offset)

Writes Excel BIFF BOUNDSHEET record.

Writes Excel BIFF BOUNDSHEET record. FIXME: inconsistent with BIFF documentation




Tags:

access:  private


Parameters:

string   $sheetname   Worksheet name
integer   $offset   Location of worksheet BOF

[ Top ]

method _storeCodepage [line 979]

void _storeCodepage( )

Stores the CODEPAGE biff record.

Stores the CODEPAGE biff record.




Tags:

access:  private


[ Top ]

method _storeDatemode [line 1149]

void _storeDatemode( )

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).




Tags:

access:  private


[ Top ]

method _storeExterncount [line 1175]

void _storeExterncount( 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.




Tags:

access:  private


Parameters:

integer   $cxals   Number of external references

[ Top ]

method _storeExterns [line 793]

void _storeExterns( )

Write the EXTERNCOUNT and EXTERNSHEET records. the NAME records.

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




Tags:

access:  private


[ Top ]

method _storeExternsheet [line 1196]

void _storeExternsheet( string $sheetname)

Writes the Excel BIFF EXTERNSHEET record. formulas. 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.




Tags:

access:  private


Parameters:

string   $sheetname   Worksheet name

[ Top ]

method _storeNameLong [line 1288]

void _storeNameLong( 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. _storeNameShort() but we use a separate method to keep the code clean.

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 _storeNameShort() but we use a separate method to keep the code clean. Code abstraction for reuse can be carried too far, and I should know. ;-)




Tags:

access:  private


Parameters:

integer   $index   Sheet index
integer   $type   Built-in name type
integer   $rowmin   Start row
integer   $rowmax   End row
integer   $colmin   Start colum
integer   $colmax   End column

[ Top ]

method _storeNames [line 809]

void _storeNames( )

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.




Tags:

access:  private


[ Top ]

method _storeNameShort [line 1222]

void _storeNameShort( 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.




Tags:

access:  private


Parameters:

integer   $index   Sheet index
integer   $type   Built-in name type
integer   $rowmin   Start row
integer   $rowmax   End row
integer   $colmin   Start colum
integer   $colmax   End column

[ Top ]

method _storeNumFormat [line 1120]

void _storeNumFormat( string $format, integer $ifmt)

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

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




Tags:

access:  private


Parameters:

string   $format   Custom format string
integer   $ifmt   Format index code

[ Top ]

method _storeOLEFile [line 593]

mixed _storeOLEFile( )

Store the workbook in an OLE container

Store the workbook in an OLE container




Tags:

return:  true on success
access:  private


[ Top ]

method _storePalette [line 1380]

void _storePalette( )

Stores the PALETTE biff record.

Stores the PALETTE biff record.




Tags:

access:  private


[ Top ]

method _storeStyle [line 1098]

void _storeStyle( )

Write Excel BIFF STYLE records.

Write Excel BIFF STYLE records.




Tags:

access:  private


[ Top ]

method _storeWindow1 [line 996]

void _storeWindow1( )

Write Excel BIFF WINDOW1 record.

Write Excel BIFF WINDOW1 record.




Tags:

access:  private


[ Top ]

method _storeWorkbook [line 498]

mixed _storeWorkbook( )

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.




Tags:

return:  true on success
access:  private


[ Top ]


Documentation generated on Mon, 27 Oct 2008 08:41:50 +0100 by phpDocumentor 1.4.1