Class Trees Index phpDocumentor Project Page

Class Worksheet

(line 45)
BIFFwriter
   |
   --Worksheet

Located in File: Program_Root/Worksheet.php


Class for generating Excel Spreadsheets

Class Variable Summary


Inherited Class Variable Summary


Method Summary

void

activate ( )


Set this worksheet as the active worksheet, i.e. the worksheet that is displayed when the workbook is opened. Also set it as selected.
void

center_horizontally ( [$center = 1] )


Center the page horinzontally.
void

center_vertically ( [$center = 1] )


Center the page horinzontally.
void

close ( $sheetnames )


Add data to the beginning of the workbook (note the reverse order) and to the end of the workbook.
void

fit_to_pages ( $width, $height )


Store the vertical and horizontal number of pages that will define the maximum area printed. It doesn't seem to work with OpenOffice.
void

freeze_panes ( $panes )


Set panes and mark them as frozen.
string

get_data ( )


Retrieves data from memory in one chunk, or from disk in $buffer sized chunks.
string

get_name ( )


Retrieve the worksheet name. This is usefull when creating worksheets without a name.
void

hide_gridlines ( )


Set the option to hide gridlines on the printed page.
void

insert_bitmap ( $row, $col, $bitmap, [$x = 0], [$y = 0], [$scale_x = 1], [$scale_y = 1] )


Insert a 24bit bitmap image in a worksheet. The main record required is IMDATA but it must be proceeded by a OBJ record to define its position.
void

merge_cells ( $first_row, $first_col, $last_row, $last_col )


This is an Excel97/2000 method. It is required to perform more complicated merging than the normal set_align('merge'). It merges the area given by its arguments.
void

print_area ( $first_row, $first_col, $last_row, $last_col )


Set the area of each worksheet that will be printed.
void

print_row_col_headers ( [$print = 1] )


Set the option to print the row and column headers on the printed page.
void

protect ( $password )


Set the worksheet protection flag to prevent accidental modification and to hide formulas if the locked and hidden format properties have been set.
void

repeat_columns ( $first_col, [$last_col = NULL] )


Set the columns to repeat at the left hand side of each printed page.
void

repeat_rows ( $first_row, [$last_row = NULL] )


Set the rows to repeat at the top of each printed page. See also the _store_name_xxxx() methods in Workbook.php
void

select ( )


Set this worksheet as a selected worksheet, i.e. the worksheet has its tab highlighted.
void

set_column ( $firstcol, $lastcol, $width, [$format = 0], [$hidden = 0] )


Set the width of a single column or a range of columns.
void

set_first_sheet ( )


Set this worksheet as the first visible sheet. This is necessary when there are a large number of worksheets and the activated worksheet is not visible on the screen.
void

set_footer ( $string, [$margin = 0.50] )


Set the page footer caption and optional margin.
void

set_header ( $string, [$margin = 0.50] )


Set the page header caption and optional margin.
void

set_h_pagebreaks ( $breaks )


Store the horizontal page breaks on a worksheet (for printing).
void

set_landscape ( )


Set the page orientation as landscape.
void

set_margins ( $margin )


Set all the page margins to the same value in inches.
void

set_margins_LR ( $margin )


Set the left and right margins to the same value in inches.
void

set_margins_TB ( $margin )


Set the top and bottom margins to the same value in inches.
void

set_margin_bottom ( [$margin = 1.00] )


Set the bottom margin in inches.
void

set_margin_left ( [$margin = 0.75] )


Set the left margin in inches.
void

set_margin_right ( [$margin = 0.75] )


Set the right margin in inches.
void

set_margin_top ( [$margin = 1.00] )


Set the top margin in inches.
void

set_paper ( [$size = 0] )


Set the paper type. Ex. 1 = US Letter, 9 = A4
void

set_portrait ( )


Set the page orientation as portrait.
void

set_print_scale ( [$scale = 100] )


Set the scale factor for the printed page.
void

set_row ( $row, $height, [$format = 0] )


This method is used to set the height and XF format for a row.
void

set_selection ( $first_row, $first_column, $last_row, $last_column )


Set which cell or cells are selected in a worksheet
void

set_v_pagebreaks ( $breaks )


Store the vertical page breaks on a worksheet (for printing).
void

set_zoom ( [$scale = 100] )


Set the worksheet zoom factor.
integer

size_col ( $col )


Convert the width of a cell from user's units to pixels. By interpolation the relationship is: y = 7x +5. If the width hasn't been set by the user we use the default value. If the col is hidden we use a value of zero.
integer

size_row ( $row )


Convert the height of a cell from user's units to pixels. By interpolation the relationship is: y = 4/3x. If the height hasn't been set by the user we use the default value. If the row is hidden we use a value of zero. (Not possible to hide row yet).
void

store_footer ( )


Store the footer caption BIFF record.
void

store_hcenter ( )


Store the horizontal centering HCENTER BIFF record.
void

store_header ( )


Store the header caption BIFF record.
void

store_vcenter ( )


Store the vertical centering VCENTER BIFF record.
void

thaw_panes ( $panes )


Set panes and mark them as unfrozen.
void

constructor Worksheet ( $name, $index, &$activesheet, &$firstsheet, &$url_format, &$parser )


Constructor
void

write ( $row, $col, $token, [$format = 0] )


Map to the appropriate write method acording to the token recieved.
void

write_blank ( $row, $col, [$format = 0] )


Write a blank cell to the specified row and column (zero indexed).
void

write_formula ( $row, $col, $formula, [$format = 0] )


Write a formula to the specified row and column (zero indexed).
void

write_note ( $row, $col, $note )


Writes a note associated with the cell given by the row and column.
void

write_number ( $row, $col, $num, [$format = 0] )


Write a double to the specified row and column (zero indexed).
void

write_string ( $row, $col, $str, [$format = 0] )


Write a string to the specified row and column (zero indexed).
void

write_url ( $row, $col, $url, [$string = ''], [$format = 0] )


Write a hyperlink. This is comprised of two elements: the visible label and the invisible link. The visible label is the same as the link unless an alternative string is specified. The label is written using the write_string() method. Therefore the 255 characters string limit applies.
void

_append ( $data )


Store Worksheet data in memory using the parent's class append() or to a temporary file, the default.
array

_cell_to_rowcol ( $cell )


Convert an Excel cell reference in A1 notation to a zero based row and column reference; converts C1 to (0, 2).
string

_encode_password ( $plaintext )


Based on the algorithm provided by Daniel Rentz of OpenOffice.
void

_initialize ( )


Open a tmp file to store the majority of the Worksheet data. If this fails, for example due to write permissions, store the data in memory. This can be slow for large files.
void

_position_image ( $col_start, $row_start, $x1, $y1, $width, $height )


Calculate the vertices that define the position of the image as required by the OBJ record.
array

_process_bitmap ( $bitmap )


Convert a 24 bit bitmap into the modified internal format used by Windows.
void

_store_colinfo ( $col_array )


Write BIFF record COLINFO to define column widths
void

_store_defcol ( )


Write BIFF record DEFCOLWIDTH if COLINFO records are in use.
void

_store_dimensions ( )


Writes Excel DIMENSIONS to define the area in which there is data.
void

_store_externcount ( $count )


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

_store_externsheet ( $sheetname )


Writes the Excel BIFF EXTERNSHEET record. These references are used by formulas. A formula references a sheet name via an index. Since we store a reference to all of the external worksheets the EXTERNSHEET index is the same as the worksheet index.
void

_store_gridset ( )


Write the GRIDSET BIFF record. Must be used in conjunction with the PRINTGRIDLINES record.
void

_store_hbreak ( )


Write the HORIZONTALPAGEBREAKS BIFF record.
void

_store_margin_bottom ( )


Store the BOTTOMMARGIN BIFF record.
void

_store_margin_left ( )


Store the LEFTMARGIN BIFF record.
void

_store_margin_right ( )


Store the RIGHTMARGIN BIFF record.
void

_store_margin_top ( )


Store the TOPMARGIN BIFF record.
void

_store_obj_picture ( $colL, $dxL, $rwT, $dyT, $colR, $dxR, $rwB, $dyB )


Store the OBJ record that precedes an IMDATA record. This could be generalise to support other Excel objects.
void

_store_panes ( $panes )


Writes the Excel BIFF PANE record.
void

_store_password ( )


Write the worksheet PASSWORD record.
void

_store_print_gridlines ( )


Write the PRINTGRIDLINES BIFF record. Must be used in conjunction with the GRIDSET record.
void

_store_print_headers ( )


Write the PRINTHEADERS BIFF record.
void

_store_protect ( )


Set the Biff PROTECT record to indicate that the worksheet is protected.
void

_store_selection ( $array )


Write BIFF record SELECTION.
void

_store_setup ( )


Store the page setup SETUP BIFF record.
void

_store_vbreak ( )


Write the VERTICALPAGEBREAKS BIFF record.
void

_store_window2 ( )


Write BIFF record Window2.
void

_store_wsbool ( )


Write the WSBOOL BIFF record, mainly for fit-to-page. Used in conjunction with the SETUP record.
void

_store_zoom ( )


Store the window zoom factor. This should be a reduced fraction but for simplicity we will store all fractions with a numerator of 100.
array

_substitute_cellref ( $cell )


Substitute an Excel cell reference in A1 notation for zero based row and column values in an argument list.
void

_write_url_external ( $row1, $col1, $row2, $col2, $url, $str, [$format = 0] )


Write links to external directory names such as 'c:\foo.xls', c:\foo.xls#Sheet1!A1', '../../foo.xls'. and '../../foo.xls#Sheet1!A1'.
void

_write_url_internal ( $row1, $col1, $row2, $col2, $url, $str, [$format = 0] )


Used to write internal reference hyperlinks such as "Sheet1!A1".
void

_write_url_range ( $row1, $col1, $row2, $col2, $url, [$string = ''], [$format = 0] )


This is the more general form of write_url(). It allows a hyperlink to be written to a range of cells. This function also decides the type of hyperlink to be written. These are either, Web (http, ftp, mailto), Internal (Sheet1!A1) or external ('c:\temp\foo.xls#Sheet1!A1').
void

_write_url_web ( $row1, $col1, $row2, $col2, $url, $str, [$format = 0] )


Used to write http, ftp and mailto hyperlinks.
integer

_XF ( &$format )


Returns an index to the XF record in the workbook

Inherited Method Summary


Method Detail

activate (line 319)

void

activate ( )

Set this worksheet as the active worksheet, i.e. the worksheet that is displayed when the workbook is opened. Also set it as selected.
Function Info:
Access - public

[ Top ]


center_horizontally (line 494)

void

center_horizontally ( [$center = 1] )

Center the page horinzontally.
Function Info:
Access - public

[ Top ]


center_vertically (line 505)

void

center_vertically ( [$center = 1] )

Center the page horinzontally.
Function Info:
Access - public

[ Top ]


close (line 163)

void

close ( $sheetnames )

Add data to the beginning of the workbook (note the reverse order) and to the end of the workbook.
Function Info:
See - store_workbook">Workbook::store_workbook()
Access - public

[ Top ]


fit_to_pages (line 682)

void

fit_to_pages ( $width, $height )

Store the vertical and horizontal number of pages that will define the maximum area printed. It doesn't seem to work with OpenOffice.
Function Info:
See - set_print_scale">set_print_scale()
Access - public

[ Top ]


freeze_panes (line 399)

void

freeze_panes ( $panes )

Set panes and mark them as frozen.
Function Info:
Access - public

[ Top ]


get_data (line 277)

string

get_data ( )

Retrieves data from memory in one chunk, or from disk in $buffer sized chunks.
Function Info:
Return - The data

[ Top ]


get_name (line 266)

string

get_name ( )

Retrieve the worksheet name. This is usefull when creating worksheets without a name.
Function Info:
Return - The worksheet's name
Access - public

[ Top ]


hide_gridlines (line 655)

void

hide_gridlines ( )

Set the option to hide gridlines on the printed page.
Function Info:
See - _store_print_gridlines">Worksheet::_store_print_gridlines(), _store_gridset">Worksheet::_store_gridset()
Access - public

[ Top ]


insert_bitmap (line 2474)

void

insert_bitmap ( $row, $col, $bitmap, [$x = 0], [$y = 0], [$scale_x = 1], [$scale_y = 1] )

Insert a 24bit bitmap image in a worksheet. The main record required is IMDATA but it must be proceeded by a OBJ record to define its position.
Function Info:
Access - public

[ Top ]


merge_cells (line 2257)

void

merge_cells ( $first_row, $first_col, $last_row, $last_col )

This is an Excel97/2000 method. It is required to perform more complicated merging than the normal set_align('merge'). It merges the area given by its arguments.
Function Info:
Access - public

[ Top ]


print_area (line 640)

void

print_area ( $first_row, $first_col, $last_row, $last_col )

Set the area of each worksheet that will be printed.
Function Info:
See - _store_names">Workbook::_store_names()
Access - public

[ Top ]


print_row_col_headers (line 668)

void

print_row_col_headers ( [$print = 1] )

Set the option to print the row and column headers on the printed page.

See also the _store_print_headers() method below.

Function Info:
See - _store_print_headers">_store_print_headers()
Access - public

[ Top ]


protect (line 344)

void

protect ( $password )

Set the worksheet protection flag to prevent accidental modification and to hide formulas if the locked and hidden format properties have been set.
Function Info:
Access - public

[ Top ]


repeat_columns (line 619)

void

repeat_columns ( $first_col, [$last_col = NULL] )

Set the columns to repeat at the left hand side of each printed page.

See also the _store_names() methods in Workbook.php

Function Info:
Access - public

[ Top ]


repeat_rows (line 600)

void

repeat_rows ( $first_row, [$last_row = NULL] )

Set the rows to repeat at the top of each printed page. See also the _store_name_xxxx() methods in Workbook.php
Function Info:
Access - public

[ Top ]


select (line 308)

void

select ( )

Set this worksheet as a selected worksheet, i.e. the worksheet has its tab highlighted.
Function Info:
Access - public

[ Top ]


set_column (line 361)

void

set_column ( $firstcol, $lastcol, $width, [$format = 0], [$hidden = 0] )

Set the width of a single column or a range of columns.
Function Info:
See - _store_colinfo">_store_colinfo()
Access - public

[ Top ]


set_first_sheet (line 332)

void

set_first_sheet ( )

Set this worksheet as the first visible sheet. This is necessary when there are a large number of worksheets and the activated worksheet is not visible on the screen.
Function Info:
Access - public

[ Top ]


set_footer (line 478)

void

set_footer ( $string, [$margin = 0.50] )

Set the page footer caption and optional margin.
Function Info:
Access - public

[ Top ]


set_header (line 461)

void

set_header ( $string, [$margin = 0.50] )

Set the page header caption and optional margin.
Function Info:
Access - public

[ Top ]


set_h_pagebreaks (line 696)

void

set_h_pagebreaks ( $breaks )

Store the horizontal page breaks on a worksheet (for printing).

The breaks represent the row after which the break is inserted.

Function Info:
Access - public

[ Top ]


set_landscape (line 437)

void

set_landscape ( )

Set the page orientation as landscape.
Function Info:
Access - public

[ Top ]


set_margins (line 516)

void

set_margins ( $margin )

Set all the page margins to the same value in inches.
Function Info:
Access - public

[ Top ]


set_margins_LR (line 530)

void

set_margins_LR ( $margin )

Set the left and right margins to the same value in inches.
Function Info:
Access - public

[ Top ]


set_margins_TB (line 542)

void

set_margins_TB ( $margin )

Set the top and bottom margins to the same value in inches.
Function Info:
Access - public

[ Top ]


set_margin_bottom (line 587)

void

set_margin_bottom ( [$margin = 1.00] )

Set the bottom margin in inches.
Function Info:
Access - public

[ Top ]


set_margin_left (line 554)

void

set_margin_left ( [$margin = 0.75] )

Set the left margin in inches.
Function Info:
Access - public

[ Top ]


set_margin_right (line 565)

void

set_margin_right ( [$margin = 0.75] )

Set the right margin in inches.
Function Info:
Access - public

[ Top ]


set_margin_top (line 576)

void

set_margin_top ( [$margin = 1.00] )

Set the top margin in inches.
Function Info:
Access - public

[ Top ]


set_paper (line 448)

void

set_paper ( [$size = 0] )

Set the paper type. Ex. 1 = US Letter, 9 = A4
Function Info:
Access - public

[ Top ]


set_portrait (line 427)

void

set_portrait ( )

Set the page orientation as portrait.
Function Info:
Access - public

[ Top ]


set_print_scale (line 742)

void

set_print_scale ( [$scale = 100] )

Set the scale factor for the printed page.

It turns off the "fit to page" option

Function Info:
Access - public

[ Top ]


set_row (line 1707)

void

set_row ( $row, $height, [$format = 0] )

This method is used to set the height and XF format for a row.

Writes the BIFF record ROW.

Function Info:
Access - public

[ Top ]


set_selection (line 383)

void

set_selection ( $first_row, $first_column, $last_row, $last_column )

Set which cell or cells are selected in a worksheet
Function Info:
See - _store_selection">_store_selection()
Access - public

[ Top ]


set_v_pagebreaks (line 710)

void

set_v_pagebreaks ( $breaks )

Store the vertical page breaks on a worksheet (for printing).

The breaks represent the column after which the break is inserted.

Function Info:
Access - public

[ Top ]


set_zoom (line 724)

void

set_zoom ( [$scale = 100] )

Set the worksheet zoom factor.
Function Info:
Access - public

[ Top ]


size_col (line 2610)

integer

size_col ( $col )

Convert the width of a cell from user's units to pixels. By interpolation the relationship is: y = 7x +5. If the width hasn't been set by the user we use the default value. If the col is hidden we use a value of zero.
Function Info:
Return - The width in pixels

[ Top ]


size_row (line 2635)

integer

size_row ( $row )

Convert the height of a cell from user's units to pixels. By interpolation the relationship is: y = 4/3x. If the height hasn't been set by the user we use the default value. If the row is hidden we use a value of zero. (Not possible to hide row yet).
Function Info:
Return - The width in pixels

[ Top ]


store_footer (line 2121)

void

store_footer ( )

Store the footer caption BIFF record.
Function Info:

[ Top ]


store_hcenter (line 2138)

void

store_hcenter ( )

Store the horizontal centering HCENTER BIFF record.
Function Info:

[ Top ]


store_header (line 2104)

void

store_header ( )

Store the header caption BIFF record.
Function Info:

[ Top ]


store_vcenter (line 2154)

void

store_vcenter ( )

Store the vertical centering VCENTER BIFF record.
Function Info:

[ Top ]


thaw_panes (line 416)

void

thaw_panes ( $panes )

Set panes and mark them as unfrozen.
Function Info:
Access - public

[ Top ]


Worksheet (line 58)

void

constructor Worksheet ( $name, $index, &$activesheet, &$firstsheet, &$url_format, &$parser )

Constructor
Function Info:

[ Top ]


write (line 767)

void

write ( $row, $col, $token, [$format = 0] )

Map to the appropriate write method acording to the token recieved.
Function Info:
Access - public

[ Top ]


write_blank (line 1167)

void

write_blank ( $row, $col, [$format = 0] )

Write a blank cell to the specified row and column (zero indexed).

A blank cell is used to specify formatting without adding a string or a number.

A blank cell without a format serves no purpose. Therefore, we don't write a BLANK record unless a format is specified. This is mainly an optimisation for the write_row() and write_col() methods.

Returns 0 : normal termination (including no format) -1 : insufficient number of arguments -2 : row or column out of range

Function Info:
Access - public

[ Top ]


write_formula (line 1225)

void

write_formula ( $row, $col, $formula, [$format = 0] )

Write a formula to the specified row and column (zero indexed).

The textual representation of the formula is passed to the parser in Parser.php which returns a packed binary string.

Returns 0 : normal termination -2 : row or column out of range

Function Info:
Access - public

[ Top ]


write_note (line 1099)

void

write_note ( $row, $col, $note )

Writes a note associated with the cell given by the row and column.

NOTE records don't have a length limit.

Function Info:
Access - public

[ Top ]


write_number (line 982)

void

write_number ( $row, $col, $num, [$format = 0] )

Write a double to the specified row and column (zero indexed).

An integer can be written as a double. Excel will display an integer. $format is optional.

Returns 0 : normal termination -2 : row or column out of range

Function Info:
Access - public

[ Top ]


write_string (line 1041)

void

write_string ( $row, $col, $str, [$format = 0] )

Write a string to the specified row and column (zero indexed).

NOTE: there is an Excel 5 defined limit of 255 characters. $format is optional. Returns 0 : normal termination -1 : insufficient number of arguments -2 : row or column out of range -3 : long string truncated to 255 chars

Function Info:
Access - public

[ Top ]


write_url (line 1316)

void

write_url ( $row, $col, $url, [$string = ''], [$format = 0] )

Write a hyperlink. This is comprised of two elements: the visible label and the invisible link. The visible label is the same as the link unless an alternative string is specified. The label is written using the write_string() method. Therefore the 255 characters string limit applies.

$string and $format are optional and their order is interchangeable.

The hyperlink can be to a http, ftp, mail, internal sheet, or external directory url.

Returns 0 : normal termination -1 : insufficient number of arguments -2 : row or column out of range -3 : long string truncated to 255 chars

Function Info:
Access - public

[ Top ]


_append (line 846)

void

_append ( $data )

Store Worksheet data in memory using the parent's class append() or to a temporary file, the default.
Function Info:

[ Top ]


_cell_to_rowcol (line 905)

array

_cell_to_rowcol ( $cell )

Convert an Excel cell reference in A1 notation to a zero based row and column reference; converts C1 to (0, 2).
Function Info:
Return - containing (row, column)

[ Top ]


_encode_password (line 935)

string

_encode_password ( $plaintext )

Based on the algorithm provided by Daniel Rentz of OpenOffice.
Function Info:
Return - The encoded password

[ Top ]


_initialize (line 140)

void

_initialize ( )

Open a tmp file to store the majority of the Worksheet data. If this fails, for example due to write permissions, store the data in memory. This can be slow for large files.
Function Info:

[ Top ]


_position_image (line 2546)

void

_position_image ( $col_start, $row_start, $x1, $y1, $width, $height )

Calculate the vertices that define the position of the image as required by the OBJ record.

+------------+------------+ | A | B | +-----+------------+------------+ | |(x1,y1) | | | 1 |(A1)._______|______ | | | | | | | | | | | +-----+----| BITMAP |-----+ | | | | | | 2 | |______________. | | | | (B2)| | | | (x2,y2)| +---- +------------+------------+

Example of a bitmap that covers some of the area from cell A1 to cell B2.

Based on the width and height of the bitmap we need to calculate 8 vars: $col_start, $row_start, $col_end, $row_end, $x1, $y1, $x2, $y2. The width and height of the cells are also variable and have to be taken into account. The values of $col_start and $row_start are passed in from the calling function. The values of $col_end and $row_end are calculated by subtracting the width and height of the bitmap from the width and height of the underlying cells. The vertices are expressed as a percentage of the underlying cell width as follows (rhs values are in pixels):

x1 = X / W *1024 y1 = Y / H *256 x2 = (X-1) / W *1024 y2 = (Y-1) / H *256

Where: X is distance from the left side of the underlying cell Y is distance from the top of the underlying cell W is the width of the cell H is the height of the cell

Function Info:

[ Top ]


_process_bitmap (line 2738)

array

_process_bitmap ( $bitmap )

Convert a 24 bit bitmap into the modified internal format used by Windows.

This is described in BITMAPCOREHEADER and BITMAPCOREINFO structures in the MSDN library.

Function Info:
Return - Array with data and properties of the bitmap

[ Top ]


_store_colinfo (line 1822)

void

_store_colinfo ( $col_array )

Write BIFF record COLINFO to define column widths

Note: The SDK says the record length is 0x0B but Excel writes a 0x0C length record.

Function Info:

[ Top ]


_store_defcol (line 1798)

void

_store_defcol ( )

Write BIFF record DEFCOLWIDTH if COLINFO records are in use.
Function Info:

[ Top ]


_store_dimensions (line 1736)

void

_store_dimensions ( )

Writes Excel DIMENSIONS to define the area in which there is data.
Function Info:

[ Top ]


_store_externcount (line 1920)

void

_store_externcount ( $count )

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

Excel only stores references to external sheets that are used in formulas. For simplicity we store references to all the sheets in the workbook regardless of whether they are used or not. This reduces the overall complexity and eliminates the need for a two way dialogue between the formula parser the worksheet objects.

Function Info:

[ Top ]


_store_externsheet (line 1938)

void

_store_externsheet ( $sheetname )

Writes the Excel BIFF EXTERNSHEET record. These references are used by formulas. A formula references a sheet name via an index. Since we store a reference to all of the external worksheets the EXTERNSHEET index is the same as the worksheet index.
Function Info:

[ Top ]


_store_gridset (line 2314)

void

_store_gridset ( )

Write the GRIDSET BIFF record. Must be used in conjunction with the PRINTGRIDLINES record.
Function Info:

[ Top ]


_store_hbreak (line 2354)

void

_store_hbreak ( )

Write the HORIZONTALPAGEBREAKS BIFF record.
Function Info:

[ Top ]


_store_margin_bottom (line 2229)

void

_store_margin_bottom ( )

Store the BOTTOMMARGIN BIFF record.
Function Info:

[ Top ]


_store_margin_left (line 2169)

void

_store_margin_left ( )

Store the LEFTMARGIN BIFF record.
Function Info:

[ Top ]


_store_margin_right (line 2189)

void

_store_margin_right ( )

Store the RIGHTMARGIN BIFF record.
Function Info:

[ Top ]


_store_margin_top (line 2209)

void

_store_margin_top ( )

Store the TOPMARGIN BIFF record.
Function Info:

[ Top ]


_store_obj_picture (line 2664)

void

_store_obj_picture ( $colL, $dxL, $rwT, $dyT, $colR, $dxR, $rwB, $dyB )

Store the OBJ record that precedes an IMDATA record. This could be generalise to support other Excel objects.
Function Info:

[ Top ]


_store_panes (line 1975)

void

_store_panes ( $panes )

Writes the Excel BIFF PANE record.

The panes can either be frozen or thawed (unfrozen). Frozen panes are specified in terms of an integer number of rows and columns. Thawed panes are specified in terms of Excel's units for rows and columns.

Function Info:

[ Top ]


_store_password (line 2443)

void

_store_password ( )

Write the worksheet PASSWORD record.
Function Info:

[ Top ]


_store_print_gridlines (line 2298)

void

_store_print_gridlines ( )

Write the PRINTGRIDLINES BIFF record. Must be used in conjunction with the GRIDSET record.
Function Info:

[ Top ]


_store_print_headers (line 2282)

void

_store_print_headers ( )

Write the PRINTHEADERS BIFF record.
Function Info:

[ Top ]


_store_protect (line 2422)

void

_store_protect ( )

Set the Biff PROTECT record to indicate that the worksheet is protected.
Function Info:

[ Top ]


_store_selection (line 1869)

void

_store_selection ( $array )

Write BIFF record SELECTION.
Function Info:
See - set_selection">set_selection()

[ Top ]


_store_setup (line 2044)

void

_store_setup ( )

Store the page setup SETUP BIFF record.
Function Info:

[ Top ]


_store_vbreak (line 2387)

void

_store_vbreak ( )

Write the VERTICALPAGEBREAKS BIFF record.
Function Info:

[ Top ]


_store_window2 (line 1755)

void

_store_window2 ( )

Write BIFF record Window2.
Function Info:

[ Top ]


_store_wsbool (line 2330)

void

_store_wsbool ( )

Write the WSBOOL BIFF record, mainly for fit-to-page. Used in conjunction with the SETUP record.
Function Info:

[ Top ]


_store_zoom (line 2820)

void

_store_zoom ( )

Store the window zoom factor. This should be a reduced fraction but for simplicity we will store all fractions with a numerator of 100.
Function Info:

[ Top ]


_substitute_cellref (line 871)

array

_substitute_cellref ( $cell )

Substitute an Excel cell reference in A1 notation for zero based row and column values in an argument list.

Ex: ("A4", "Hello") is converted to (3, 0, "Hello").

Function Info:

[ Top ]


_write_url_external (line 1488)

void

_write_url_external ( $row1, $col1, $row2, $col2, $url, $str, [$format = 0] )

Write links to external directory names such as 'c:\foo.xls', c:\foo.xls#Sheet1!A1', '../../foo.xls'. and '../../foo.xls#Sheet1!A1'.

Note: Excel writes some relative links with the $dir_long string. We ignore these cases for the sake of simpler code.

Function Info:
See - write_url">write_url()

[ Top ]


_write_url_internal (line 1424)

void

_write_url_internal ( $row1, $col1, $row2, $col2, $url, $str, [$format = 0] )

Used to write internal reference hyperlinks such as "Sheet1!A1".
Function Info:
See - write_url">write_url()

[ Top ]


_write_url_range (line 1339)

void

_write_url_range ( $row1, $col1, $row2, $col2, $url, [$string = ''], [$format = 0] )

This is the more general form of write_url(). It allows a hyperlink to be written to a range of cells. This function also decides the type of hyperlink to be written. These are either, Web (http, ftp, mailto), Internal (Sheet1!A1) or external ('c:\temp\foo.xls#Sheet1!A1').

See also write_url() above for a general description and return values.

Function Info:

[ Top ]


_write_url_web (line 1366)

void

_write_url_web ( $row1, $col1, $row2, $col2, $url, $str, [$format = 0] )

Used to write http, ftp and mailto hyperlinks.

The link type ($options) is 0x03 is the same as absolute dir ref without sheet. However it is differentiated by the $unknown2 data stream.

Function Info:
See - write_url">write_url()

[ Top ]


_XF (line 820)

integer

_XF ( &$format )

Returns an index to the XF record in the workbook
Function Info:
Return - The XF record index

[ Top ]



Variable Detail



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