Class Trees Index phpDocumentor Project Page

Class Workbook

(line 46)
BIFFwriter
   |
   --Workbook

Located in File: Program_Root/Workbook.php


Class for generating Excel Spreadsheets

Class Variable Summary


Inherited Class Variable Summary


Method Summary

&object

&addformat ( [$properties = array()] )


DEPRECATED!! Use add_format instead
&object

&addworksheet ( [$name = ''] )


DEPRECATED!! Use add_worksheet instead
&object

&add_format ( [$properties = array()] )


Add a new format to the Excel workbook. This adds an XF record and a FONT record. Also, pass any properties to the Format constructor.
&object

&add_worksheet ( [$name = ''] )


Add a new worksheet to the Excel workbook.
void

close ( )


Calls finalization methods and explicitly close the OLEwriter file handle.
integer

set_custom_color ( $index, $red, $green, $blue )


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

sheets ( )


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

store_name_long ( $index, $type, $rowmin, $rowmax, $colmin, $colmax )


Store the NAME record in the long format that is used for storing the repeat rows and columns when both are specified. This share a lot of code with _store_name_short() but we use a separate method to keep the code clean.
void

store_name_short ( $index, $type, $rowmin, $rowmax, $colmin, $colmax )


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

store_workbook ( )


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

constructor Workbook ( $filename )


Class constructor
array

worksheets ( )


An accessor for the _worksheets[] array.
void

_calc_sheet_offsets ( )


Calculate offsets for Worksheet BOF records.
void

_set_palette_xl97 ( )


Sets the colour palette to the Excel 97+ default.
void

_store_1904 ( )


Write Excel 1904 record to indicate the date system in use.
void

_store_all_fonts ( )


Store the Excel FONT records.
void

_store_all_num_formats ( )


Store user defined numerical formats i.e. FORMAT records
void

_store_all_styles ( )


Write all STYLE records.
void

_store_all_xfs ( )


Write all XF records.
void

_store_boundsheet ( $sheetname, $offset )


Writes Excel BIFF BOUNDSHEET record.
void

_store_externcount ( $cxals )


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

_store_externs ( )


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

_store_externsheet ( $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.
void

_store_names ( )


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

_store_num_format ( $format, $ifmt )


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

_store_OLE_file ( )


Store the workbook in an OLE container if the total size of the workbook data is less than ~ 7MB.
void

_store_palette ( )


Stores the PALETTE biff record.
void

_store_style ( )


Write Excel BIFF STYLE records.
void

_store_window1 ( )


Write Excel BIFF WINDOW1 record.

Inherited Method Summary


Method Detail

addformat (line 197)

&object

&addformat ( [$properties = array()] )

DEPRECATED!! Use add_format instead
Function Info:
Return - reference to an XF format
Deprecated - Use add_format instead
Access - public

[ Top ]


addworksheet (line 168)

&object

&addworksheet ( [$name = ''] )

DEPRECATED!! Use add_worksheet instead
Function Info:
Return - reference to a worksheet object
Deprecated - Use add_worksheet instead
Access - public

[ Top ]


add_format (line 181)

&object

&add_format ( [$properties = array()] )

Add a new format to the Excel workbook. This adds an XF record and a FONT record. Also, pass any properties to the Format constructor.
Function Info:
Return - reference to an XF format
Access - public

[ Top ]


add_worksheet (line 129)

&object

&add_worksheet ( [$name = ''] )

Add a new worksheet to the Excel workbook.

TODO: Add accessor for $this->{_sheetname} for international Excel versions.

Function Info:
Return - reference to a worksheet object
Access - public

[ Top ]


close (line 90)

void

close ( )

Calls finalization methods and explicitly close the OLEwriter file handle.
Function Info:

[ Top ]


set_custom_color (line 213)

integer

set_custom_color ( $index, $red, $green, $blue )

Change the RGB components of the elements in the colour palette.
Function Info:
Return - The palette index for the custom color
Access - public

[ Top ]


sheets (line 106)

array

sheets ( )

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

[ Top ]


store_name_long (line 858)

void

store_name_long ( $index, $type, $rowmin, $rowmax, $colmin, $colmax )

Store the NAME record in the long format that is used for storing the repeat rows and columns when both are specified. This share a lot of code with _store_name_short() but we use a separate method to keep the code clean.

Code abstraction for reuse can be carried too far, and I should know. ;-)

Function Info:

[ Top ]


store_name_short (line 793)

void

store_name_short ( $index, $type, $rowmin, $rowmax, $colmin, $colmax )

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

[ Top ]


store_workbook (line 328)

void

store_workbook ( )

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

[ Top ]


Workbook (line 53)

void

constructor Workbook ( $filename )

Class constructor
Function Info:

[ Top ]


worksheets (line 116)

array

worksheets ( )

An accessor for the _worksheets[] array.
Function Info:

[ Top ]


_calc_sheet_offsets (line 394)

void

_calc_sheet_offsets ( )

Calculate offsets for Worksheet BOF records.
Function Info:

[ Top ]


_set_palette_xl97 (line 243)

void

_set_palette_xl97 ( )

Sets the colour palette to the Excel 97+ default.
Function Info:

[ Top ]


_store_1904 (line 723)

void

_store_1904 ( )

Write Excel 1904 record to indicate the date system in use.
Function Info:

[ Top ]


_store_all_fonts (line 413)

void

_store_all_fonts ( )

Store the Excel FONT records.
Function Info:

[ Top ]


_store_all_num_formats (line 455)

void

_store_all_num_formats ( )

Store user defined numerical formats i.e. FORMAT records
Function Info:

[ Top ]


_store_all_styles (line 532)

void

_store_all_styles ( )

Write all STYLE records.
Function Info:

[ Top ]


_store_all_xfs (line 506)

void

_store_all_xfs ( )

Write all XF records.
Function Info:

[ Top ]


_store_boundsheet (line 671)

void

_store_boundsheet ( $sheetname, $offset )

Writes Excel BIFF BOUNDSHEET record.
Function Info:

[ Top ]


_store_externcount (line 748)

void

_store_externcount ( $cxals )

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.

Function Info:

[ Top ]


_store_externs (line 541)

void

_store_externs ( )

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

[ Top ]


_store_externsheet (line 768)

void

_store_externsheet ( $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.

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

Function Info:

[ Top ]


_store_names (line 555)

void

_store_names ( )

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

[ Top ]


_store_num_format (line 708)

void

_store_num_format ( $format, $ifmt )

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

[ Top ]


_store_OLE_file (line 373)

void

_store_OLE_file ( )

Store the workbook in an OLE container if the total size of the workbook data is less than ~ 7MB.
Function Info:

[ Top ]


_store_palette (line 932)

void

_store_palette ( )

Stores the PALETTE biff record.
Function Info:

[ Top ]


_store_style (line 687)

void

_store_style ( )

Write Excel BIFF STYLE records.
Function Info:

[ Top ]


_store_window1 (line 640)

void

_store_window1 ( )

Write Excel BIFF WINDOW1 record.
Function Info:

[ Top ]



Variable Detail



Documention generated on Wed, 30 Apr 2003 11:14:31 -0400 by phpDocumentor 1.2.0