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

Class: PHPExcel_Writer_Excel5_Worksheet

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

Class Overview

PHPExcel_Writer_Excel5_BIFFwriter
   |
   --PHPExcel_Writer_Excel5_Worksheet

Class for generating Excel Spreadsheets


Author(s):

Variables

Methods


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 46]
Class for generating Excel Spreadsheets

Class for generating Excel Spreadsheets




Tags:

author:  Xavier Noguer <xnoguer@rezebra.com>


[ Top ]


Class Variables

$index =

[line 58]

Index for the Worksheet

Index for the Worksheet



Type:   integer


[ Top ]

$name =

[line 52]

Name of the Worksheet

Name of the Worksheet



Type:   string


[ Top ]

$print_colmax =

[line 288]

Last column of the area to print

Last column of the area to print



Type:   integer


[ Top ]

$print_colmin =

[line 282]

First column of the area to print

First column of the area to print



Type:   integer


[ Top ]

$print_rowmax =

[line 276]

Last row to of the area to print

Last row to of the area to print



Type:   integer


[ Top ]

$print_rowmin =

[line 270]

First row of the area to print

First row of the area to print



Type:   integer


[ Top ]

$selected =

[line 174]

Bit specifying if the worksheet is selected

Bit specifying if the worksheet is selected



Type:   integer


[ Top ]

$title_colmin =

[line 264]

First column to reapeat on each printed page

First column to reapeat on each printed page



Type:   integer


[ Top ]

$title_rowmax =

[line 258]

Last row to reapeat on each printed page

Last row to reapeat on each printed page



Type:   integer


[ Top ]

$title_rowmin =

[line 252]

First row to reapeat on each printed page

First row to reapeat on each printed page



Type:   integer


[ Top ]

$_active_pane =

[line 162]

The active pane for the worksheet

The active pane for the worksheet




Tags:

access:  private

Type:   integer


[ Top ]

$_biff8_input_encoding =  'UTF-16LE'

[line 1601]



Tags:

access:  private

Type:   mixed


[ Top ]

$_colinfo =

[line 144]

Array containing format information for columns

Array containing format information for columns




Tags:

access:  private

Type:   array


[ Top ]

$_defaultRowHeight =  null

[line 138]

Default row height in twips = 1/20 point

Default row height in twips = 1/20 point




Tags:

access:  private

Type:   mixed


[ Top ]

$_defColWidth =  8

[line 133]

Default column character width

Default column character width




Tags:

access:  private

Type:   mixed


[ Top ]

$_dim_colmax =

[line 128]

Last column for the DIMENSIONS record

Last column for the DIMENSIONS record




Tags:


Type:   integer


[ Top ]

$_dim_colmin =

[line 121]

First column for the DIMENSIONS record

First column for the DIMENSIONS record




Tags:


Type:   integer


[ Top ]

$_dim_rowmax =

[line 114]

Last row for the DIMENSIONS record

Last row for the DIMENSIONS record




Tags:


Type:   integer


[ Top ]

$_dim_rowmin =

[line 107]

First row for the DIMENSIONS record

First row for the DIMENSIONS record




Tags:


Type:   integer


[ Top ]

$_filehandle =

[line 76]

Filehandle to the temporary file for storing data

Filehandle to the temporary file for storing data




Tags:

access:  private

Type:   resource


[ Top ]

$_firstColumnIndex =

[line 396]

Index of first used column (at least 0)

Index of first used column (at least 0)




Tags:

access:  private

Type:   int


[ Top ]

$_firstRowIndex =

[line 384]

Index of first used row (at least 0)

Index of first used row (at least 0)




Tags:

access:  private

Type:   int


[ Top ]

$_fit_height =

[line 336]

Number of pages to fit high

Number of pages to fit high




Tags:

access:  private

Type:   integer


[ Top ]

$_fit_page =

[line 324]

Whether to fit to page when printing or not.

Whether to fit to page when printing or not.




Tags:

access:  private

Type:   bool


[ Top ]

$_fit_width =

[line 330]

Number of pages to fit wide

Number of pages to fit wide




Tags:

access:  private

Type:   integer


[ Top ]

$_footer =

[line 198]

The page footer caption

The page footer caption




Tags:

access:  private

Type:   string


[ Top ]

$_frozen =

[line 168]

Bit specifying if panes are frozen

Bit specifying if panes are frozen




Tags:

access:  private

Type:   integer


[ Top ]

$_hcenter =

[line 204]

The horizontal centering value for the page

The horizontal centering value for the page




Tags:

access:  private

Type:   integer


[ Top ]

$_header =

[line 192]

The page header caption

The page header caption




Tags:

access:  private

Type:   string


[ Top ]

$_input_encoding =

[line 366]

Charset encoding currently used when calling writeString()

Charset encoding currently used when calling writeString()




Tags:

access:  private

Type:   string


[ Top ]

$_lastColumnIndex =

[line 402]

Index of last used column (no used columns means -1)

Index of last used column (no used columns means -1)




Tags:

access:  private

Type:   int


[ Top ]

$_lastRowIndex =

[line 390]

Index of last used row.

Index of last used row. (no used rows means -1)




Tags:

access:  private

Type:   int


[ Top ]

$_margin_bottom =

[line 246]

The bottom margin for the worksheet in inches

The bottom margin for the worksheet in inches




Tags:

access:  private

Type:   float


[ Top ]

$_margin_foot =

[line 222]

The margin for the footer

The margin for the footer




Tags:

access:  private

Type:   float


[ Top ]

$_margin_head =

[line 216]

The margin for the header

The margin for the header




Tags:

access:  private

Type:   float


[ Top ]

$_margin_left =

[line 228]

The left margin for the worksheet in inches

The left margin for the worksheet in inches




Tags:

access:  private

Type:   float


[ Top ]

$_margin_right =

[line 234]

The right margin for the worksheet in inches

The right margin for the worksheet in inches




Tags:

access:  private

Type:   float


[ Top ]

$_margin_top =

[line 240]

The top margin for the worksheet in inches

The top margin for the worksheet in inches




Tags:

access:  private

Type:   float


[ Top ]

$_merged_ranges =

[line 360]

Merged cell ranges

Merged cell ranges




Tags:

access:  private

Type:   array


[ Top ]

$_orientation =

[line 186]

Bit specifying paper orientation (for printing).

Bit specifying paper orientation (for printing). 0 => landscape, 1 => portrait




Tags:

access:  private

Type:   integer


[ Top ]

$_outline_below =

[line 306]

Whether to have outline summary below.

Whether to have outline summary below.




Tags:

access:  private

Type:   bool


[ Top ]

$_outline_on =

[line 294]

Whether to use outline.

Whether to use outline.




Tags:

access:  private

Type:   integer


[ Top ]

$_outline_right =

[line 312]

Whether to have outline summary at the right.

Whether to have outline summary at the right.




Tags:

access:  private

Type:   bool


[ Top ]

$_outline_row_level =

[line 318]

Outline row level.

Outline row level.




Tags:

access:  private

Type:   integer


[ Top ]

$_outline_style =

[line 300]

Auto outline styles.

Auto outline styles.




Tags:

access:  private

Type:   bool


[ Top ]

$_panes =

[line 156]

Array containing the panes for the worksheet

Array containing the panes for the worksheet




Tags:

access:  private

Type:   array


[ Top ]

$_paper_size =

[line 180]

The paper size (for printing) (DOCUMENT!!!)

The paper size (for printing) (DOCUMENT!!!)




Tags:

access:  private

Type:   integer


[ Top ]

$_parser =

[line 70]

Reference to the parser used for parsing formulas

Reference to the parser used for parsing formulas




Tags:

access:  private

Type:   object Format


[ Top ]

$_selection =

[line 150]

Array containing the selected area for the worksheet

Array containing the selected area for the worksheet




Tags:

access:  private

Type:   array


[ Top ]

$_str_table =

[line 354]

Reference to the array containing all the unique strings in the workbook

Reference to the array containing all the unique strings in the workbook




Tags:

access:  private

Type:   array


[ Top ]

$_str_total =

[line 342]

Reference to the total number of strings in the workbook

Reference to the total number of strings in the workbook




Tags:

access:  private

Type:   integer


[ Top ]

$_str_unique =

[line 348]

Reference to the number of unique strings in the workbook

Reference to the number of unique strings in the workbook




Tags:

access:  private

Type:   integer


[ Top ]

$_tempFilesCreated = array()

[line 378]

List of temporary files created

List of temporary files created




Tags:

access:  private

Type:   array


[ Top ]

$_tmp_dir =

[line 372]

The temporary dir for storing files

The temporary dir for storing files




Tags:

access:  private

Type:   string


[ Top ]

$_url_format =

[line 64]

Reference to the (default) Format object for URLs

Reference to the (default) Format object for URLs




Tags:

access:  private

Type:   object Format


[ Top ]

$_using_tmpfile =

[line 82]

Boolean indicating if we are using a temporary file for storing data

Boolean indicating if we are using a temporary file for storing data




Tags:

access:  private

Type:   bool


[ Top ]

$_vcenter =

[line 210]

The vertical centering value for the page

The vertical centering value for the page




Tags:

access:  private

Type:   integer


[ Top ]

$_xls_colmax =

[line 94]

Maximum number of columns for an Excel spreadsheet (BIFF5)

Maximum number of columns for an Excel spreadsheet (BIFF5)




Tags:

access:  private

Type:   integer


[ Top ]

$_xls_rowmax =

[line 88]

Maximum number of rows for an Excel spreadsheet (BIFF5)

Maximum number of rows for an Excel spreadsheet (BIFF5)




Tags:

access:  private

Type:   integer


[ Top ]

$_xls_strmax =

[line 100]

Maximum number of characters for a string (LABEL record in BIFF5)

Maximum number of characters for a string (LABEL record in BIFF5)




Tags:

access:  private

Type:   integer


[ Top ]



Class Methods


constructor PHPExcel_Writer_Excel5_Worksheet [line 416]

PHPExcel_Writer_Excel5_Worksheet PHPExcel_Writer_Excel5_Worksheet( $BIFF_version, string $name, integer $index, mixed &$activesheet, mixed &$firstsheet, &$str_total, &$str_unique, &$str_table, mixed &$url_format, mixed &$parser, [string $tempDir = ''])

Constructor

Constructor




Tags:

access:  private


Parameters:

string   $name   The name of the new worksheet
integer   $index   The index of the new worksheet
mixed   &$activesheet   The current activesheet of the workbook we belong to
mixed   &$firstsheet   The first worksheet in the workbook we belong to
mixed   &$url_format   The default format for hyperlinks
mixed   &$parser   The formula parser created for the Workbook
string   $tempDir   The temporary directory to be used
   $BIFF_version  
   &$str_total  
   &$str_unique  
   &$str_table  

[ Top ]

method activate [line 771]

void activate( )

Set this worksheet as the active worksheet, i.

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




Tags:

access:  public


[ Top ]

method centerHorizontally [line 946]

void centerHorizontally( [integer $center = 1])

Center the page horinzontally.

Center the page horinzontally.




Tags:

access:  public


Parameters:

integer   $center   the optional value for centering. Defaults to 1 (center).

[ Top ]

method centerVertically [line 957]

void centerVertically( [integer $center = 1])

Center the page vertically.

Center the page vertically.




Tags:

access:  public


Parameters:

integer   $center   the optional value for centering. Defaults to 1 (center).

[ Top ]

method cleanup [line 519]

void cleanup( )

Cleanup

Cleanup




Tags:

access:  public


[ Top ]

method close [line 574]

void close( array $sheetnames)

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

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




Tags:

see:  PHPExcel_Writer_Excel5_Workbook::storeWorkbook()
access:  public


Parameters:

array   $sheetnames   The array of sheetnames from the Workbook this worksheet belongs to

[ Top ]

method fitToPages [line 1136]

void fitToPages( integer $width, integer $height)

Set the vertical and horizontal number of pages that will define the maximum area printed.

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




Tags:



Parameters:

integer   $width   Maximun width of printed area in pages
integer   $height   Maximun heigth of printed area in pages

[ Top ]

method freezePanes [line 851]

void freezePanes( array $panes)

Set panes and mark them as frozen.

Set panes and mark them as frozen.




Tags:

access:  public


Parameters:

array   $panes   This is the only parameter received and is composed of the following:
  1. => Vertical split position,
  2. => Horizontal split position
  3. => Top row visible
  4. => Leftmost column visible
  5. => Active pane

[ Top ]

method getData [line 709]

string getData( )

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

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




Tags:

return:  The data


[ Top ]

method getName [line 698]

string getName( )

Retrieve the worksheet name.

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




Tags:

return:  The worksheet's name
access:  public


[ Top ]

method hideGridlines [line 1101]

void hideGridlines( )

Set the option to hide gridlines on the printed page.

Set the option to hide gridlines on the printed page.




Tags:

access:  public


[ Top ]

method hideScreenGridlines [line 1111]

void hideScreenGridlines( )

Set the option to hide gridlines on the worksheet (as seen on the screen).

Set the option to hide gridlines on the worksheet (as seen on the screen).




Tags:

access:  public


[ Top ]

method insertBitmap [line 3212]

void insertBitmap( integer $row, integer $col, mixed $bitmap, [integer $x = 0], [integer $y = 0], [float $scale_x = 1], [float $scale_y = 1])

Insert a 24bit bitmap image in a worksheet.

Insert a 24bit bitmap image in a worksheet.




Tags:

access:  public


Parameters:

integer   $row   The row we are going to insert the bitmap into
integer   $col   The column we are going to insert the bitmap into
mixed   $bitmap   The bitmap filename or GD-image resource
integer   $x   The horizontal position (offset) of the image inside the cell.
integer   $y   The vertical position (offset) of the image inside the cell.
float   $scale_x   The horizontal scale
float   $scale_y   The vertical scale

[ Top ]

method mergeCells [line 2903]

void mergeCells( integer $first_row, integer $first_col, integer $last_row, integer $last_col)

Merges the area given by its arguments.

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




Tags:

access:  public


Parameters:

integer   $first_row   First row of the area to merge
integer   $first_col   First column of the area to merge
integer   $last_row   Last row of the area to merge
integer   $last_col   Last column of the area to merge

[ Top ]

method printArea [line 1087]

void printArea( integer $first_row, integer $first_col, integer $last_row, integer $last_col)

Set the area of each worksheet that will be printed.

Set the area of each worksheet that will be printed.




Tags:

access:  public


Parameters:

integer   $first_row   First row of the area to print
integer   $first_col   First column of the area to print
integer   $last_row   Last row of the area to print
integer   $last_col   Last column of the area to print

[ Top ]

method printRowColHeaders [line 1122]

void printRowColHeaders( [integer $print = 1])

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

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




Tags:

access:  public


Parameters:

integer   $print   Whether to print the headers or not. Defaults to 1 (print).

[ Top ]

method protect [line 797]

void protect( string $password, [ $encoded = false])

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

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




Tags:

access:  public


Parameters:

string   $password   The password to use for protecting the sheet.
   $encoded  

[ Top ]

method repeatColumns [line 1068]

void repeatColumns( integer $first_col, [integer $last_col = null])

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

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




Tags:

access:  public


Parameters:

integer   $first_col   First column to repeat
integer   $last_col   Last column to repeat. Optional.

[ Top ]

method repeatRows [line 1051]

void repeatRows( integer $first_row, [integer $last_row = null])

Set the rows to repeat at the top of each printed page.

Set the rows to repeat at the top of each printed page.




Tags:

access:  public


Parameters:

integer   $first_row   First row to repeat
integer   $last_row   Last row to repeat. Optional.

[ Top ]

method select [line 759]

void select( )

Set this worksheet as a selected worksheet, i.

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




Tags:

access:  public


[ Top ]

method setBIFF8InputEncoding [line 1602]

void setBIFF8InputEncoding( $encoding)



Parameters:

   $encoding  

[ Top ]

method setColumn [line 814]

void setColumn( integer $firstcol, integer $lastcol, integer $width, [mixed $format = null], [integer $hidden = 0], [integer $level = 0])

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

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




Tags:

access:  public


Parameters:

integer   $firstcol   first column on the range
integer   $lastcol   last column on the range
integer   $width   width to set
mixed   $format   The optional XF format to apply to the columns
integer   $hidden   The optional hidden atribute
integer   $level   The optional outline level

[ Top ]

method setDefaultRowHeight [line 2204]

void setDefaultRowHeight( $height)

Set the default row height in twips = 1/20 of a point

Set the default row height in twips = 1/20 of a point




Tags:

access:  public


Parameters:

   $height  

[ Top ]

method setDefColWidth [line 2196]

void setDefColWidth( integer $width)

Set the default column (character) width

Set the default column (character) width




Tags:

access:  public


Parameters:

integer   $width  

[ Top ]

method setDimensions [line 3642]

void setDimensions( [int $firstRowIndex = 0], [int $lastRowIndex = -1], [int $firstColumnIndex = 0], [int $lastColumnIndex = -1])

Set sheet dimensions

Set sheet dimensions




Tags:

access:  public


Parameters:

int   $firstRowIndex  
int   $lastRowIndex  
int   $firstColumnIndex  
int   $lastColumnIndex  

[ Top ]

method setFirstSheet [line 784]

void setFirstSheet( )

Set this worksheet as the first visible 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.




Tags:

access:  public


[ Top ]

method setFooter [line 930]

void setFooter( string $string, [float $margin = 0.50])

Set the page footer caption and optional margin.

Set the page footer caption and optional margin.




Tags:

access:  public


Parameters:

string   $string   The footer text
float   $margin   optional foot margin in inches.

[ Top ]

method setHeader [line 913]

void setHeader( string $string, [float $margin = 0.50])

Set the page header caption and optional margin.

Set the page header caption and optional margin.




Tags:

access:  public


Parameters:

string   $string   The header text
float   $margin   optional head margin in inches.

[ Top ]

method setHPagebreaks [line 1150]

void setHPagebreaks( array $breaks)

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

Store the horizontal page breaks on a worksheet (for printing). The breaks represent the row after which the break is inserted.




Tags:

access:  public


Parameters:

array   $breaks   Array containing the horizontal page breaks

[ Top ]

method setInputEncoding [line 1615]

void setInputEncoding( string $encoding)

Sets Input Encoding for writing strings

Sets Input Encoding for writing strings




Tags:

access:  public


Parameters:

string   $encoding   The encoding. Ex: 'UTF-16LE', 'utf-8', 'ISO-859-7'

[ Top ]

method setLandscape [line 889]

void setLandscape( )

Set the page orientation as landscape.

Set the page orientation as landscape.




Tags:

access:  public


[ Top ]

method setMarginBottom [line 1039]

void setMarginBottom( [float $margin = 1.00])

Set the bottom margin in inches.

Set the bottom margin in inches.




Tags:

access:  public


Parameters:

float   $margin   The margin to set in inches

[ Top ]

method setMarginLeft [line 1006]

void setMarginLeft( [float $margin = 0.75])

Set the left margin in inches.

Set the left margin in inches.




Tags:

access:  public


Parameters:

float   $margin   The margin to set in inches

[ Top ]

method setMarginRight [line 1017]

void setMarginRight( [float $margin = 0.75])

Set the right margin in inches.

Set the right margin in inches.




Tags:

access:  public


Parameters:

float   $margin   The margin to set in inches

[ Top ]

method setMargins [line 968]

void setMargins( float $margin)

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

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




Tags:

access:  public


Parameters:

float   $margin   The margin to set in inches

[ Top ]

method setMargins_LR [line 982]

void setMargins_LR( float $margin)

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

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




Tags:

access:  public


Parameters:

float   $margin   The margin to set in inches

[ Top ]

method setMargins_TB [line 994]

void setMargins_TB( float $margin)

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

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




Tags:

access:  public


Parameters:

float   $margin   The margin to set in inches

[ Top ]

method setMarginTop [line 1028]

void setMarginTop( [float $margin = 1.00])

Set the top margin in inches.

Set the top margin in inches.




Tags:

access:  public


Parameters:

float   $margin   The margin to set in inches

[ Top ]

method setMerge [line 743]

void setMerge( integer $first_row, integer $first_col, integer $last_row, integer $last_col)

Sets a merged cell range

Sets a merged cell range




Tags:

access:  public


Parameters:

integer   $first_row   First row of the area to merge
integer   $first_col   First column of the area to merge
integer   $last_row   Last row of the area to merge
integer   $last_col   Last column of the area to merge

[ Top ]

method setOutline [line 1468]

void setOutline( [bool $visible = true], [bool $symbols_below = true], [bool $symbols_right = true], [bool $auto_style = false])

This method sets the properties for outlining and grouping. correspond to Excel's defaults.

This method sets the properties for outlining and grouping. The defaults correspond to Excel's defaults.




Parameters:

bool   $visible  
bool   $symbols_below  
bool   $symbols_right  
bool   $auto_style  

[ Top ]

method setPaper [line 900]

void setPaper( [integer $size = 0])

Set the paper type.

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




Tags:

access:  public


Parameters:

integer   $size   The type of paper size to use

[ Top ]

method setPortrait [line 879]

void setPortrait( )

Set the page orientation as portrait.

Set the page orientation as portrait.




Tags:

access:  public


[ Top ]

method setPrintScale [line 1196]

void setPrintScale( [integer $scale = 100])

Set the scale factor for the printed page.

Set the scale factor for the printed page. It turns off the "fit to page" option




Tags:

access:  public


Parameters:

integer   $scale   The optional scale factor. Defaults to 100

[ Top ]

method setRow [line 2220]

void setRow( integer $row, integer $height, [mixed $format = null], [bool $hidden = false], [integer $level = 0])

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

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




Tags:

access:  public


Parameters:

integer   $row   The row to set
integer   $height   Height we are giving to the row. Use null to set XF without setting height
mixed   $format   XF format we are giving to the row
bool   $hidden   The optional hidden attribute
integer   $level   The optional outline level for row, in range [0,7]

[ Top ]

method setSelection [line 835]

void setSelection( integer $first_row, integer $first_column, integer $last_row, integer $last_column)

Set which cell or cells are selected in a worksheet

Set which cell or cells are selected in a worksheet




Tags:

access:  public


Parameters:

integer   $first_row   first row in the selected quadrant
integer   $first_column   first column in the selected quadrant
integer   $last_row   last row in the selected quadrant
integer   $last_column   last column in the selected quadrant

[ Top ]

method setTempDir [line 556]

true setTempDir( string $dir)

Sets the temp dir used for storing files

Sets the temp dir used for storing files




Tags:

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


Parameters:

string   $dir   The dir to be used as temp dir

[ Top ]

method setVPagebreaks [line 1164]

void setVPagebreaks( array $breaks)

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

Store the vertical page breaks on a worksheet (for printing). The breaks represent the column after which the break is inserted.




Tags:

access:  public


Parameters:

array   $breaks   Array containing the vertical page breaks

[ Top ]

method setZoom [line 1178]

void setZoom( [integer $scale = 100])

Set the worksheet zoom factor.

Set the worksheet zoom factor.




Tags:

access:  public


Parameters:

integer   $scale   The zoom factor

[ Top ]

method thawPanes [line 868]

void thawPanes( array $panes)

Set panes and mark them as unfrozen.

Set panes and mark them as unfrozen.




Tags:

access:  public


Parameters:

array   $panes   This is the only parameter received and is composed of the following:
  1. => Vertical split position,
  2. => Horizontal split position
  3. => Top row visible
  4. => Leftmost column visible
  5. => Active pane

[ Top ]

method write [line 1219]

void write( integer $row, integer $col, mixed $token, [mixed $format = null], [ $numberFormat = null])

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

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




Tags:

access:  public


Parameters:

integer   $row   The row of the cell we are writing to
integer   $col   The column of the cell we are writing to
mixed   $token   What we are writing
mixed   $format   The optional format to apply to the cell
   $numberFormat  

[ Top ]

method writeBlank [line 1783]

void writeBlank( integer $row, integer $col, mixed $format)

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

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. Returns 0 : normal termination (including no format) -1 : insufficient number of arguments -2 : row or column out of range




Tags:

access:  public


Parameters:

integer   $row   Zero indexed row
integer   $col   Zero indexed column
mixed   $format   The XF format

[ Top ]

method writeBoolErr [line 1823]

void writeBoolErr( $row, $col, $value, $isError, $format)

Write a boolean or an error type to the specified row and column (zero indexed)

Write a boolean or an error type to the specified row and column (zero indexed)




Tags:

access:  public


Parameters:

   $row  
   $col  
   $value  
   $isError  
   $format  

[ Top ]

method writeCol [line 1302]

void writeCol( integer $row, integer $col, array $val, [mixed $format = null], [ $numberFormat = null])

Write an array of values as a column

Write an array of values as a column




Tags:

access:  public


Parameters:

integer   $row   The first row (uppermost row) we are writing to
integer   $col   The col we are writing to
array   $val   The array of values to write
mixed   $format   The optional format to apply to the cell
   $numberFormat  

[ Top ]

method writeFormula [line 1871]

integer writeFormula( integer $row, integer $col, string $formula, [mixed $format = null])

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

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 -1 : formula errors (bad formula) -2 : row or column out of range




Tags:

access:  public


Parameters:

integer   $row   Zero indexed row
integer   $col   Zero indexed column
string   $formula   The formula text string
mixed   $format   The optional XF format

[ Top ]

method writeNote [line 1723]

void writeNote( integer $row, integer $col, string $note)

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

Writes a note associated with the cell given by the row and column. NOTE records don't have a length limit.




Tags:

access:  public


Parameters:

integer   $row   Zero indexed row
integer   $col   Zero indexed column
string   $note   The note to write

[ Top ]

method writeNumber [line 1503]

integer writeNumber( integer $row, integer $col, float $num, [mixed $format = null])

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

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




Tags:

access:  public


Parameters:

integer   $row   Zero indexed row
integer   $col   Zero indexed column
float   $num   The number to write
mixed   $format   The optional XF format

[ Top ]

method writeRow [line 1274]

void writeRow( integer $row, integer $col, array $val, [mixed $format = null], [ $numberFormat = null])

Write an array of values as a row

Write an array of values as a row




Tags:

access:  public


Parameters:

integer   $row   The row we are writing to
integer   $col   The first col (leftmost col) we are writing to
array   $val   The array of values to write
mixed   $format   The optional format to apply to the cell
   $numberFormat  

[ Top ]

method writeString [line 1556]

integer writeString( integer $row, integer $col, string $str, [mixed $format = null])

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

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 -2 : row or column out of range -3 : long string truncated to 255 chars




Tags:

access:  public


Parameters:

integer   $row   Zero indexed row
integer   $col   Zero indexed column
string   $str   The string to write
mixed   $format   The XF format for the cell

[ Top ]

method writeStringBIFF8 [line 1638]

integer writeStringBIFF8( integer $row, integer $col, string $str, [mixed $format = null])

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

Write a string to the specified row and column (zero indexed). This is the BIFF8 version (no 255 chars limit). $format is optional. Returns 0 : normal termination -2 : row or column out of range -3 : long string truncated to 255 chars




Tags:

access:  public


Parameters:

integer   $row   Zero indexed row
integer   $col   Zero indexed column
string   $str   The string to write
mixed   $format   The XF format for the cell

[ Top ]

method writeUrl [line 1939]

integer writeUrl( integer $row, integer $col, string $url)

Write a hyperlink.

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 writeString() method. Therefore the 255 characters string limit applies. $string and $format are optional. The hyperlink can be to a http, ftp, mail, internal sheet (not yet), or external directory url. Returns 0 : normal termination -2 : row or column out of range -3 : long string truncated to 255 chars




Tags:

access:  public


Parameters:

integer   $row   Row
integer   $col   Column
string   $url   URL string

[ Top ]

method _append [line 1347]

void _append( string $data)

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

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




Tags:

access:  private


Overrides PHPExcel_Writer_Excel5_BIFFwriter::_append() (General storage function)

Parameters:

string   $data   The binary data to append

[ Top ]

method _cellToRowcol [line 1407]

array _cellToRowcol( string $cell)

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

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




Tags:

return:  containing (row, column)
access:  private


Parameters:

string   $cell   The cell reference.

[ Top ]

method _checkRowCol [line 1691]

boolean _checkRowCol( integer $row, integer $col)

Check row and col before writing to a cell, and update the sheet's

Check row and col before writing to a cell, and update the sheet's dimensions accordingly




Tags:

return:  true for success, false if row and/or col are grester then maximums allowed.
access:  private


Parameters:

integer   $row   Zero indexed row
integer   $col   Zero indexed column

[ Top ]

method _encodePassword [line 1438]

string _encodePassword( string $plaintext)

Based on the algorithm provided by Daniel Rentz of OpenOffice.

Based on the algorithm provided by Daniel Rentz of OpenOffice.




Tags:

return:  The encoded password
access:  private


Parameters:

string   $plaintext   The password to be encoded in plaintext.

[ Top ]

method _initialize [line 534]

void _initialize( )

Open a tmp file to store the majority of the Worksheet data. for example due to write permissions, store the data in memory. slow for large files.

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.




Tags:

access:  private


[ Top ]

method _positionImage [line 3286]

void _positionImage( integer $col_start, integer $row_start, integer $x1, integer $y1, integer $width, integer $height)

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

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




Tags:

access:  private


Parameters:

integer   $col_start   Col containing upper left corner of object
integer   $row_start   Row containing top left corner of object
integer   $x1   Distance to left side of object
integer   $y1   Distance to top of object
integer   $width   Width of image frame
integer   $height   Height of image frame

[ Top ]

method _processBitmap [line 3507]

array _processBitmap( string $bitmap)

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

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.




Tags:

return:  Array with data and properties of the bitmap
access:  private


Parameters:

string   $bitmap   The bitmap to process

[ Top ]

method _processBitmapGd [line 3477]

array _processBitmapGd( resource $image)

Convert a GD-image into the internal format.

Convert a GD-image into the internal format.




Tags:

return:  Array with data and properties of the bitmap
access:  private


Parameters:

resource   $image   The image to process

[ Top ]

method _sizeCol [line 3352]

integer _sizeCol( integer $col)

Convert the width of a cell from user's units to pixels. the relationship is: y = 7x +5. use the default value.

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.




Tags:

return:  The width in pixels
access:  private


Parameters:

integer   $col   The column

[ Top ]

method _sizeRow [line 3376]

integer _sizeRow( integer $row)

Convert the height of a cell from user's units to pixels. the relationship is: y = 4/3x. use the default value. possible to hide row yet).

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




Tags:

return:  The width in pixels
access:  private


Parameters:

integer   $row   The row

[ Top ]

method _storeColinfo [line 2409]

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

Write BIFF record COLINFO to define column widths Note: The SDK says the record length is 0x0B but Excel writes a 0x0C length record.




Tags:

access:  private


Parameters:

array   $col_array   This is the only parameter received and is composed of the following:
  1. => First formatted column,
  2. => Last formatted column,
  3. => Col width (8.43 is Excel default),
  4. => The optional XF format of the column,
  5. => Option flags.
  6. => Optional outline level

[ Top ]

method _storeDataValidity [line 3611]

void _storeDataValidity( )

Store the DVAL and DV records.

Store the DVAL and DV records.




Tags:

access:  private


[ Top ]

method _storeDefaultRowHeight [line 2365]

void _storeDefaultRowHeight( )

Write BIFF record DEFAULTROWHEIGHT.

Write BIFF record DEFAULTROWHEIGHT.




Tags:

access:  private


[ Top ]

method _storeDefcol [line 2382]

void _storeDefcol( )

Write BIFF record DEFCOLWIDTH if COLINFO records are in use.

Write BIFF record DEFCOLWIDTH if COLINFO records are in use.




Tags:

access:  private


[ Top ]

method _storeDimensions [line 2277]

void _storeDimensions( )

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

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




Tags:

access:  private


[ Top ]

method _storeExterncount [line 2533]

void _storeExterncount( integer $count)

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

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.




Tags:

access:  private


Parameters:

integer   $count   The number of external sheet references in this worksheet

[ Top ]

method _storeExternsheet [line 2552]

void _storeExternsheet( string $sheetname)

Writes the Excel BIFF EXTERNSHEET record. formulas. reference to all of the external worksheets the EXTERNSHEET index is the same as the worksheet index.

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.




Tags:

access:  private


Parameters:

string   $sheetname   The name of a external worksheet

[ Top ]

method _storeFooter [line 2750]

void _storeFooter( )

Store the footer caption BIFF record.

Store the footer caption BIFF record.




Tags:

access:  private


[ Top ]

method _storeGridset [line 2966]

void _storeGridset( )

Write the GRIDSET BIFF record. PRINTGRIDLINES record.

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




Tags:

access:  private


[ Top ]

method _storeGuts [line 2986]

void _storeGuts( )

Write the GUTS BIFF record. where Excel outline symbols are displayed. controlled by a flag in WSBOOL.

Write the GUTS BIFF record. This is used to configure the gutter margins where Excel outline symbols are displayed. The visibility of the gutters is controlled by a flag in WSBOOL.




Tags:



[ Top ]

method _storeHbreak [line 3070]

void _storeHbreak( )

Write the HORIZONTALPAGEBREAKS BIFF record.

Write the HORIZONTALPAGEBREAKS BIFF record.




Tags:

access:  private


[ Top ]

method _storeHcenter [line 2778]

void _storeHcenter( )

Store the horizontal centering HCENTER BIFF record.

Store the horizontal centering HCENTER BIFF record.




Tags:

access:  private


[ Top ]

method _storeHeader [line 2722]

void _storeHeader( )

Store the header caption BIFF record.

Store the header caption BIFF record.




Tags:

access:  private


[ Top ]

method _storeMarginBottom [line 2876]

void _storeMarginBottom( )

Store the BOTTOMMARGIN BIFF record.

Store the BOTTOMMARGIN BIFF record.




Tags:

access:  private


[ Top ]

method _storeMarginLeft [line 2813]

void _storeMarginLeft( )

Store the LEFTMARGIN BIFF record.

Store the LEFTMARGIN BIFF record.




Tags:

access:  private


[ Top ]

method _storeMarginRight [line 2834]

void _storeMarginRight( )

Store the RIGHTMARGIN BIFF record.

Store the RIGHTMARGIN BIFF record.




Tags:

access:  private


[ Top ]

method _storeMarginTop [line 2855]

void _storeMarginTop( )

Store the TOPMARGIN BIFF record.

Store the TOPMARGIN BIFF record.




Tags:

access:  private


[ Top ]

method _storeMergedCells [line 2503]

void _storeMergedCells( )

Store the MERGEDCELLS record for all ranges of merged cells

Store the MERGEDCELLS record for all ranges of merged cells




Tags:

access:  private


[ Top ]

method _storeObjPicture [line 3404]

void _storeObjPicture( integer $colL, integer $dxL, integer $rwT, integer $dyT, integer $colR, integer $dxR, integer $rwB, integer $dyB)

Store the OBJ record that precedes an IMDATA record. to support other Excel objects.

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




Tags:

access:  private


Parameters:

integer   $colL   Column containing upper left corner of object
integer   $dxL   Distance from left side of cell
integer   $rwT   Row containing top left corner of object
integer   $dyT   Distance from top of cell
integer   $colR   Column containing lower right corner of object
integer   $dxR   Distance from right of cell
integer   $rwB   Row containing bottom right corner of object
integer   $dyB   Distance from bottom of cell

[ Top ]

method _storePanes [line 2589]

void _storePanes( array $panes)

Writes the Excel BIFF PANE record.

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.




Tags:

access:  private


Parameters:

array   $panes   This is the only parameter received and is composed of the following:
  1. => Vertical split position,
  2. => Horizontal split position
  3. => Top row visible
  4. => Leftmost column visible
  5. => Active pane

[ Top ]

method _storePassword [line 3181]

void _storePassword( )

Write the worksheet PASSWORD record.

Write the worksheet PASSWORD record.




Tags:

access:  private


[ Top ]

method _storePrintGridlines [line 2948]

void _storePrintGridlines( )

Write the PRINTGRIDLINES BIFF record. GRIDSET record.

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




Tags:

access:  private


[ Top ]

method _storePrintHeaders [line 2930]

void _storePrintHeaders( )

Write the PRINTHEADERS BIFF record.

Write the PRINTHEADERS BIFF record.




Tags:

access:  private


[ Top ]

method _storeProtect [line 3158]

void _storeProtect( )

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

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




Tags:

access:  private


[ Top ]

method _storeSelection [line 2462]

void _storeSelection( array $array)

Write BIFF record SELECTION.

Write BIFF record SELECTION.




Tags:



Parameters:

array   $array   array containing ($rwFirst,$colFirst,$rwLast,$colLast)

[ Top ]

method _storeSetup [line 2661]

void _storeSetup( )

Store the page setup SETUP BIFF record.

Store the page setup SETUP BIFF record.




Tags:

access:  private


[ Top ]

method _storeVbreak [line 3113]

void _storeVbreak( )

Write the VERTICALPAGEBREAKS BIFF record.

Write the VERTICALPAGEBREAKS BIFF record.




Tags:

access:  private


[ Top ]

method _storeVcenter [line 2796]

void _storeVcenter( )

Store the vertical centering VCENTER BIFF record.

Store the vertical centering VCENTER BIFF record.




Tags:

access:  private


[ Top ]

method _storeWindow2 [line 2306]

void _storeWindow2( )

Write BIFF record Window2.

Write BIFF record Window2.




Tags:

access:  private


[ Top ]

method _storeWsbool [line 3028]

void _storeWsbool( )

Write the WSBOOL BIFF record, mainly for fit-to-page. with the SETUP record.

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




Tags:

access:  private


[ Top ]

method _storeZoom [line 3591]

void _storeZoom( )

Store the window zoom factor. simplicity we will store all fractions with a numerator of 100.

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




Tags:

access:  private


[ Top ]

method _substituteCellref [line 1371]

array _substituteCellref( string $cell)

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

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




Tags:

access:  private


Parameters:

string   $cell   The cell reference. Or range of cells.

[ Top ]

method _writeUrlExternal [line 2085]

integer _writeUrlExternal( integer $row1, integer $col1, integer $row2, integer $col2, string $url)

Write links to external directory names such as 'c:\foo. c:\foo.

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.




Tags:



Parameters:

integer   $row1   Start row
integer   $col1   Start column
integer   $row2   End row
integer   $col2   End column
string   $url   URL string

[ Top ]

method _writeUrlInternal [line 2034]

integer _writeUrlInternal( integer $row1, integer $col1, integer $row2, integer $col2, string $url)

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

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




Tags:



Parameters:

integer   $row1   Start row
integer   $col1   Start column
integer   $row2   End row
integer   $col2   End column
string   $url   URL string

[ Top ]

method _writeUrlRange [line 1961]

integer _writeUrlRange( integer $row1, integer $col1, integer $row2, integer $col2, string $url)

This is the more general form of writeUrl(). written to a range of cells. to be written. (Sheet1!A1) or external ('c:\temp\foo.

This is the more general form of writeUrl(). 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').




Tags:



Parameters:

integer   $row1   Start row
integer   $col1   Start column
integer   $row2   End row
integer   $col2   End column
string   $url   URL string

[ Top ]

method _writeUrlWeb [line 1989]

integer _writeUrlWeb( integer $row1, integer $col1, integer $row2, integer $col2, string $url)

Used to write http, ftp and mailto hyperlinks.

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.




Tags:



Parameters:

integer   $row1   Start row
integer   $col1   Start column
integer   $row2   End row
integer   $col2   End column
string   $url   URL string

[ Top ]

method _XF [line 1323]

integer _XF( mixed &$format)

Returns an index to the XF record in the workbook

Returns an index to the XF record in the workbook




Tags:

return:  The XF record index
access:  private


Parameters:

mixed   &$format   The optional XF format

[ Top ]


Documentation generated on Mon, 27 Oct 2008 08:42:12 +0100 by phpDocumentor 1.4.1