|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| Spreadsheet_Excel_Writer_Worksheet ($BIFF_version, $name, $index, &$activesheet, &$firstsheet, &$str_total, &$str_unique, &$str_table, &$url_format, &$parser) | |
| _initialize () | |
| close ($sheetnames) | |
| getName () | |
| getData () | |
| setMerge ($first_row, $first_col, $last_row, $last_col) | |
| select () | |
| activate () | |
| setFirstSheet () | |
| protect ($password) | |
| setColumn ($firstcol, $lastcol, $width, $format=null, $hidden=0, $level=0) | |
| setSelection ($first_row, $first_column, $last_row, $last_column) | |
| freezePanes ($panes) | |
| thawPanes ($panes) | |
| setPortrait () | |
| setLandscape () | |
| setPaper ($size=0) | |
| setHeader ($string, $margin=0.50) | |
| setFooter ($string, $margin=0.50) | |
| centerHorizontally ($center=1) | |
| centerVertically ($center=1) | |
| setMargins ($margin) | |
| setMargins_LR ($margin) | |
| setMargins_TB ($margin) | |
| setMarginLeft ($margin=0.75) | |
| setMarginRight ($margin=0.75) | |
| setMarginTop ($margin=1.00) | |
| setMarginBottom ($margin=1.00) | |
| repeatRows ($first_row, $last_row=null) | |
| repeatColumns ($first_col, $last_col=null) | |
| printArea ($first_row, $first_col, $last_row, $last_col) | |
| hideGridlines () | |
| hideScreenGridlines () | |
| printRowColHeaders ($print=1) | |
| fitToPages ($width, $height) | |
| setHPagebreaks ($breaks) | |
| setVPagebreaks ($breaks) | |
| setZoom ($scale=100) | |
| setPrintScale ($scale=100) | |
| write ($row, $col, $token, $format=null) | |
| writeRow ($row, $col, $val, $format=null) | |
| writeCol ($row, $col, $val, $format=null) | |
| _XF (&$format) | |
| _append ($data) | |
| _substituteCellref ($cell) | |
| _cellToRowcol ($cell) | |
| _encodePassword ($plaintext) | |
| setOutline ($visible=true, $symbols_below=true, $symbols_right=true, $auto_style=false) | |
| writeNumber ($row, $col, $num, $format=null) | |
| writeString ($row, $col, $str, $format=null) | |
| setInputEncoding ($encoding) | |
| writeStringBIFF8 ($row, $col, $str, $format=null) | |
| _checkRowCol ($row, $col) | |
| writeNote ($row, $col, $note) | |
| writeBlank ($row, $col, $format) | |
| writeFormula ($row, $col, $formula, $format=null) | |
| writeUrl ($row, $col, $url, $string= '', $format=null) | |
| _writeUrlRange ($row1, $col1, $row2, $col2, $url, $string= '', $format=null) | |
| _writeUrlWeb ($row1, $col1, $row2, $col2, $url, $str, $format=null) | |
| _writeUrlInternal ($row1, $col1, $row2, $col2, $url, $str, $format=null) | |
| _writeUrlExternal ($row1, $col1, $row2, $col2, $url, $str, $format=null) | |
| setRow ($row, $height, $format=null, $hidden=false, $level=0) | |
| _storeDimensions () | |
| _storeWindow2 () | |
| _storeDefcol () | |
| _storeColinfo ($col_array) | |
| _storeSelection ($array) | |
| _storeMergedCells () | |
| _storeExterncount ($count) | |
| _storeExternsheet ($sheetname) | |
| _storePanes ($panes) | |
| _storeSetup () | |
| _storeHeader () | |
| _storeFooter () | |
| _storeHcenter () | |
| _storeVcenter () | |
| _storeMarginLeft () | |
| _storeMarginRight () | |
| _storeMarginTop () | |
| _storeMarginBottom () | |
| mergeCells ($first_row, $first_col, $last_row, $last_col) | |
| _storePrintHeaders () | |
| _storePrintGridlines () | |
| _storeGridset () | |
| _storeGuts () | |
| _storeWsbool () | |
| _storeHbreak () | |
| _storeVbreak () | |
| _storeProtect () | |
| _storePassword () | |
| insertBitmap ($row, $col, $bitmap, $x=0, $y=0, $scale_x=1, $scale_y=1) | |
| _positionImage ($col_start, $row_start, $x1, $y1, $width, $height) | |
| _sizeCol ($col) | |
| _sizeRow ($row) | |
| _storeObjPicture ($colL, $dxL, $rwT, $dyT, $colR, $dxR, $rwB, $dyB) | |
| _processBitmap ($bitmap) | |
| _storeZoom () | |
| setValidation ($row1, $col1, $row2, $col2, &$validator) | |
| _storeDataValidity () | |
Data Fields | |
| $name | |
| $index | |
| $_url_format | |
| $_parser | |
| $_filehandle | |
| $_using_tmpfile | |
| $_xls_rowmax | |
| $_xls_colmax | |
| $_xls_strmax | |
| $_dim_rowmin | |
| $_dim_rowmax | |
| $_dim_colmin | |
| $_dim_colmax | |
| $_colinfo | |
| $_selection | |
| $_panes | |
| $_active_pane | |
| $_frozen | |
| $selected | |
| $_paper_size | |
| $_orientation | |
| $_header | |
| $_footer | |
| $_hcenter | |
| $_vcenter | |
| $_margin_head | |
| $_margin_foot | |
| $_margin_left | |
| $_margin_right | |
| $_margin_top | |
| $_margin_bottom | |
| $title_rowmin | |
| $title_rowmax | |
| $title_colmin | |
| $print_rowmin | |
| $print_rowmax | |
| $print_colmin | |
| $print_colmax | |
| $_outline_on | |
| $_outline_style | |
| $_outline_below | |
| $_outline_right | |
| $_outline_row_level | |
| $_fit_page | |
| $_fit_width | |
| $_fit_height | |
| $_str_total | |
| $_str_unique | |
| $_str_table | |
| $_merged_ranges | |
| $_input_encoding | |
| $record = 0x01B8 | |
| $length = 0x00000 | |
| if(!$format) | $url = preg_replace('/^external:/', '', $url) |
| $url = preg_replace('/\//', "\\", $url) | |
| if($str== '') | $str_error = $this->writeString($row1, $col1, $str, $format) |
| if(($str_error==-2) or($str_error==-3)) | $absolute = 0x02 |
| if(!preg_match("/\\\/", $url)) if(preg_match("/^\.\.\\\/", $url) | $link_type ) = 0x01 | $absolute |
| $dir_long = $url | |
| if(preg_match("/\#/", $url)) | $link_type = pack("V", $link_type) |
| $up_count = preg_match_all("/\.\.\\\/", $dir_long, $useless) | |
| $dir_short = "\0" | |
| $dir_short_len = pack("V", strlen($dir_short) ) | |
| $dir_long_len = pack("V", strlen($dir_long) ) | |
| $stream_len = pack("V", 0) | |
| $unknown1 = pack("H*",'D0C9EA79F9BACE118C8200AA004BA90B02000000' ) | |
| $unknown2 = pack("H*",'0303000000000000C000000000000046' ) | |
| $unknown3 = pack("H*",'FFFFADDE000000000000000000000000000000000000000') | |
| $unknown4 = pack("v", 0x03 ) | |
| $data | |
| $header = pack("vv", $record, $length) | |
Definition at line 46 of file Worksheet.php.
| _append | ( | $ | data | ) |
Store Worksheet data in memory using the parent's class append() or to a temporary file, the default.
private
| string | $data | The binary data to append |
Reimplemented from Spreadsheet_Excel_Writer_BIFFwriter.
Definition at line 1255 of file Worksheet.php.


| _cellToRowcol | ( | $ | cell | ) |
Convert an Excel cell reference in A1 notation to a zero based row and column reference; converts C1 to (0, 2).
private
| string | $cell | The cell reference. |
Definition at line 1315 of file Worksheet.php.

| _checkRowCol | ( | $ | row, |
| $ | col | ||
| ) |
Check row and col before writing to a cell, and update the sheet's dimensions accordingly
private
| integer | $row | Zero indexed row |
| integer | $col | Zero indexed column |
Definition at line 1591 of file Worksheet.php.

| _encodePassword | ( | $ | plaintext | ) |
Based on the algorithm provided by Daniel Rentz of OpenOffice.
private
| string | $plaintext | The password to be encoded in plaintext. |
Definition at line 1346 of file Worksheet.php.

| _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.
private
Definition at line 474 of file Worksheet.php.

| _positionImage | ( | $ | 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
private
| 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 |
Definition at line 3173 of file Worksheet.php.
| _processBitmap | ( | $ | 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.
private
| string | $bitmap | The bitmap to process |
Definition at line 3366 of file Worksheet.php.
| _sizeCol | ( | $ | 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.
private
| integer | $col | The column |
Definition at line 3239 of file Worksheet.php.
| _sizeRow | ( | $ | 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).
private
| integer | $row | The row |
Definition at line 3263 of file Worksheet.php.
| _storeColinfo | ( | $ | 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.
private
| array | $col_array | This is the only parameter received and is composed of the following: 0 => First formatted column, 1 => Last formatted column, 2 => Col width (8.43 is Excel default), 3 => The optional XF format of the column, 4 => Option flags. 5 => Optional outline level |
Definition at line 2289 of file Worksheet.php.

| _storeDefcol | ( | ) |
Write BIFF record DEFCOLWIDTH if COLINFO records are in use.
private
Definition at line 2263 of file Worksheet.php.

| _storeDimensions | ( | ) |
Writes Excel DIMENSIONS to define the area in which there is data.
private
Definition at line 2177 of file Worksheet.php.

| _storeExterncount | ( | $ | 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.
private
| integer | $count | The number of external sheet references in this worksheet |
Definition at line 2413 of file Worksheet.php.

| _storeExternsheet | ( | $ | 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.
private
| string | $sheetname | The name of a external worksheet |
Definition at line 2432 of file Worksheet.php.

| _storeFooter | ( | ) |
Store the footer caption BIFF record.
private
Definition at line 2630 of file Worksheet.php.

| _storeGridset | ( | ) |
Write the GRIDSET BIFF record. Must be used in conjunction with the PRINTGRIDLINES record.
private
Definition at line 2846 of file Worksheet.php.

| _storeGuts | ( | ) |
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.
Definition at line 2866 of file Worksheet.php.

| _storeHbreak | ( | ) |
Write the HORIZONTALPAGEBREAKS BIFF record.
private
Definition at line 2953 of file Worksheet.php.

| _storeHcenter | ( | ) |
Store the horizontal centering HCENTER BIFF record.
private
Definition at line 2658 of file Worksheet.php.

| _storeHeader | ( | ) |
Store the header caption BIFF record.
private
Definition at line 2602 of file Worksheet.php.

Store the BOTTOMMARGIN BIFF record.
private
Definition at line 2756 of file Worksheet.php.

| _storeMarginLeft | ( | ) |
Store the LEFTMARGIN BIFF record.
private
Definition at line 2693 of file Worksheet.php.

Store the RIGHTMARGIN BIFF record.
private
Definition at line 2714 of file Worksheet.php.

| _storeMarginTop | ( | ) |
Store the TOPMARGIN BIFF record.
private
Definition at line 2735 of file Worksheet.php.

Store the MERGEDCELLS record for all ranges of merged cells
private
Definition at line 2383 of file Worksheet.php.

| _storeObjPicture | ( | $ | 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.
private
| 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 |
Definition at line 3291 of file Worksheet.php.
| _storePanes | ( | $ | 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.
private
| array | $panes | This is the only parameter received and is composed of the following: 0 => Vertical split position, 1 => Horizontal split position 2 => Top row visible 3 => Leftmost column visible 4 => Active pane |
Definition at line 2469 of file Worksheet.php.

| _storePassword | ( | ) |
Write the worksheet PASSWORD record.
private
Definition at line 3064 of file Worksheet.php.

Write the PRINTGRIDLINES BIFF record. Must be used in conjunction with the GRIDSET record.
private
Definition at line 2828 of file Worksheet.php.

Write the PRINTHEADERS BIFF record.
private
Definition at line 2810 of file Worksheet.php.

| _storeProtect | ( | ) |
Set the Biff PROTECT record to indicate that the worksheet is protected.
private
Definition at line 3041 of file Worksheet.php.

| _storeSelection | ( | $ | array | ) |
Write BIFF record SELECTION.
private
| array | $array | array containing ($rwFirst,$colFirst,$rwLast,$colLast) |
Definition at line 2342 of file Worksheet.php.

| _storeSetup | ( | ) |
Store the page setup SETUP BIFF record.
private
Definition at line 2541 of file Worksheet.php.

| _storeVbreak | ( | ) |
Write the VERTICALPAGEBREAKS BIFF record.
private
Definition at line 2996 of file Worksheet.php.

| _storeVcenter | ( | ) |
Store the vertical centering VCENTER BIFF record.
private
Definition at line 2676 of file Worksheet.php.

| _storeWindow2 | ( | ) |
Write BIFF record Window2.
private
Definition at line 2204 of file Worksheet.php.

| _storeWsbool | ( | ) |
Write the WSBOOL BIFF record, mainly for fit-to-page. Used in conjunction with the SETUP record.
private
Definition at line 2911 of file Worksheet.php.

| _storeZoom | ( | ) |
Store the window zoom factor. This should be a reduced fraction but for simplicity we will store all fractions with a numerator of 100.
private
Definition at line 3450 of file Worksheet.php.

| _substituteCellref | ( | $ | 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").
private
| string | $cell | The cell reference. Or range of cells. |
Definition at line 1279 of file Worksheet.php.

| _writeUrlExternal | ( | $ | row1, |
| $ | col1, | ||
| $ | row2, | ||
| $ | col2, | ||
| $ | url, | ||
| $ | str, | ||
| $ | format = null |
||
| ) |
Write links to external directory names such as 'c:.xls', c:.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.
private
| integer | $row1 | Start row |
| integer | $col1 | Start column |
| integer | $row2 | End row |
| integer | $col2 | End column |
| string | $url | URL string |
| string | $str | Alternative label |
| mixed | $format | The cell format |
Definition at line 1994 of file Worksheet.php.

| _writeUrlInternal | ( | $ | row1, |
| $ | col1, | ||
| $ | row2, | ||
| $ | col2, | ||
| $ | url, | ||
| $ | str, | ||
| $ | format = null |
||
| ) |
Used to write internal reference hyperlinks such as "Sheet1!A1".
private
| integer | $row1 | Start row |
| integer | $col1 | Start column |
| integer | $row2 | End row |
| integer | $col2 | End column |
| string | $url | URL string |
| string | $str | Alternative label |
| mixed | $format | The cell format |
Definition at line 1928 of file Worksheet.php.


| _writeUrlRange | ( | $ | row1, |
| $ | col1, | ||
| $ | row2, | ||
| $ | col2, | ||
| $ | url, | ||
| $ | string = '', |
||
| $ | format = null |
||
| ) |
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:.xls::Sheet1!A1').
private
| integer | $row1 | Start row |
| integer | $col1 | Start column |
| integer | $row2 | End row |
| integer | $col2 | End column |
| string | $url | URL string |
| string | $string | Alternative label |
| mixed | $format | The cell format |
Definition at line 1838 of file Worksheet.php.


| _writeUrlWeb | ( | $ | row1, |
| $ | col1, | ||
| $ | row2, | ||
| $ | col2, | ||
| $ | url, | ||
| $ | str, | ||
| $ | format = null |
||
| ) |
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.
private
| integer | $row1 | Start row |
| integer | $col1 | Start column |
| integer | $row2 | End row |
| integer | $col2 | End column |
| string | $url | URL string |
| string | $str | Alternative label |
| mixed | $format | The cell format |
Definition at line 1868 of file Worksheet.php.


| _XF | ( | &$ | format | ) |
Returns an index to the XF record in the workbook
private
| mixed | &$format | The optional XF format |
Definition at line 1231 of file Worksheet.php.

| 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.
public
Definition at line 688 of file Worksheet.php.
| centerHorizontally | ( | $ | center = 1 | ) |
Center the page horinzontally.
public
| integer | $center | the optional value for centering. Defaults to 1 (center). |
Definition at line 863 of file Worksheet.php.
| centerVertically | ( | $ | center = 1 | ) |
Center the page vertically.
public
| integer | $center | the optional value for centering. Defaults to 1 (center). |
Definition at line 874 of file Worksheet.php.
| close | ( | $ | sheetnames | ) |
Add data to the beginning of the workbook (note the reverse order) and to the end of the workbook.
public
| array | $sheetnames | The array of sheetnames from the Workbook this worksheet belongs to |
Definition at line 496 of file Worksheet.php.

| fitToPages | ( | $ | width, |
| $ | height | ||
| ) |
Set the vertical and horizontal number of pages that will define the maximum area printed. It doesn't seem to work with OpenOffice.
public
| integer | $width | Maximun width of printed area in pages |
| integer | $height | Maximun heigth of printed area in pages |
Definition at line 1053 of file Worksheet.php.
| freezePanes | ( | $ | panes | ) |
Set panes and mark them as frozen.
public
| array | $panes | This is the only parameter received and is composed of the following: 0 => Vertical split position, 1 => Horizontal split position 2 => Top row visible 3 => Leftmost column visible 4 => Active pane |
Definition at line 768 of file Worksheet.php.
| getData | ( | ) |
Retrieves data from memory in one chunk, or from disk in $buffer sized chunks.
Definition at line 626 of file Worksheet.php.
| getName | ( | ) |
Retrieve the worksheet name. This is usefull when creating worksheets without a name.
public
Definition at line 615 of file Worksheet.php.
| hideGridlines | ( | ) |
Set the option to hide gridlines on the printed page.
public
Definition at line 1018 of file Worksheet.php.
Set the option to hide gridlines on the worksheet (as seen on the screen).
public
Definition at line 1028 of file Worksheet.php.
| insertBitmap | ( | $ | row, |
| $ | col, | ||
| $ | bitmap, | ||
| $ | x = 0, |
||
| $ | y = 0, |
||
| $ | scale_x = 1, |
||
| $ | scale_y = 1 |
||
| ) |
Insert a 24bit bitmap image in a worksheet.
public
| integer | $row | The row we are going to insert the bitmap into |
| integer | $col | The column we are going to insert the bitmap into |
| string | $bitmap | The bitmap filename |
| integer | $x | The horizontal position (offset) of the image inside the cell. |
| integer | $y | The vertical position (offset) of the image inside the cell. |
| integer | $scale_x | The horizontal scale |
| integer | $scale_y | The vertical scale |
Definition at line 3095 of file Worksheet.php.
| mergeCells | ( | $ | first_row, |
| $ | first_col, | ||
| $ | last_row, | ||
| $ | last_col | ||
| ) |
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').
public
| 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 |
Definition at line 2783 of file Worksheet.php.
| printArea | ( | $ | first_row, |
| $ | first_col, | ||
| $ | last_row, | ||
| $ | last_col | ||
| ) |
Set the area of each worksheet that will be printed.
public
| 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 |
Definition at line 1004 of file Worksheet.php.
| printRowColHeaders | ( | $ | print = 1 | ) |
Set the option to print the row and column headers on the printed page.
public
| integer | Whether to print the headers or not. Defaults to 1 (print). |
Definition at line 1039 of file Worksheet.php.
| 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.
public
| string | $password | The password to use for protecting the sheet. |
Definition at line 714 of file Worksheet.php.

| repeatColumns | ( | $ | first_col, |
| $ | last_col = null |
||
| ) |
Set the columns to repeat at the left hand side of each printed page.
public
| integer | $first_col | First column to repeat |
| integer | $last_col | Last column to repeat. Optional. |
Definition at line 985 of file Worksheet.php.
| repeatRows | ( | $ | first_row, |
| $ | last_row = null |
||
| ) |
Set the rows to repeat at the top of each printed page.
public
| integer | $first_row | First row to repeat |
| integer | $last_row | Last row to repeat. Optional. |
Definition at line 968 of file Worksheet.php.
| select | ( | ) |
Set this worksheet as a selected worksheet, i.e. the worksheet has its tab highlighted.
public
Definition at line 676 of file Worksheet.php.
| setColumn | ( | $ | firstcol, |
| $ | lastcol, | ||
| $ | width, | ||
| $ | format = null, |
||
| $ | hidden = 0, |
||
| $ | level = 0 |
||
| ) |
Set the width of a single column or a range of columns.
public
| 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 |
Definition at line 731 of file Worksheet.php.
| setFirstSheet | ( | ) |
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.
public
Definition at line 701 of file Worksheet.php.
| setFooter | ( | $ | string, |
| $ | margin = 0.50 |
||
| ) |
Set the page footer caption and optional margin.
public
| string | $string | The footer text |
| float | $margin | optional foot margin in inches. |
Definition at line 847 of file Worksheet.php.
| setHeader | ( | $ | string, |
| $ | margin = 0.50 |
||
| ) |
Set the page header caption and optional margin.
public
| string | $string | The header text |
| float | $margin | optional head margin in inches. |
Definition at line 830 of file Worksheet.php.
| setHPagebreaks | ( | $ | breaks | ) |
Store the horizontal page breaks on a worksheet (for printing). The breaks represent the row after which the break is inserted.
public
| array | $breaks | Array containing the horizontal page breaks |
Definition at line 1067 of file Worksheet.php.
| setInputEncoding | ( | $ | encoding | ) |
Sets Input Encoding for writing strings
public
| string | $encoding | The encoding. Ex: 'UTF-16LE', 'utf-8', 'ISO-859-7' |
Definition at line 1515 of file Worksheet.php.

| setLandscape | ( | ) |
| setMarginBottom | ( | $ | margin = 1.00 | ) |
Set the bottom margin in inches.
public
| float | $margin | The margin to set in inches |
Definition at line 956 of file Worksheet.php.

| setMarginLeft | ( | $ | margin = 0.75 | ) |
Set the left margin in inches.
public
| float | $margin | The margin to set in inches |
Definition at line 923 of file Worksheet.php.

| setMarginRight | ( | $ | margin = 0.75 | ) |
Set the right margin in inches.
public
| float | $margin | The margin to set in inches |
Definition at line 934 of file Worksheet.php.

| setMargins | ( | $ | margin | ) |
Set all the page margins to the same value in inches.
public
| float | $margin | The margin to set in inches |
Definition at line 885 of file Worksheet.php.

| setMargins_LR | ( | $ | margin | ) |
Set the left and right margins to the same value in inches.
public
| float | $margin | The margin to set in inches |
Definition at line 899 of file Worksheet.php.

| setMargins_TB | ( | $ | margin | ) |
Set the top and bottom margins to the same value in inches.
public
| float | $margin | The margin to set in inches |
Definition at line 911 of file Worksheet.php.

| setMarginTop | ( | $ | margin = 1.00 | ) |
Set the top margin in inches.
public
| float | $margin | The margin to set in inches |
Definition at line 945 of file Worksheet.php.

| setMerge | ( | $ | first_row, |
| $ | first_col, | ||
| $ | last_row, | ||
| $ | last_col | ||
| ) |
Sets a merged cell range
public
| 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 |
Definition at line 660 of file Worksheet.php.
| setOutline | ( | $ | visible = true, |
| $ | symbols_below = true, |
||
| $ | symbols_right = true, |
||
| $ | auto_style = false |
||
| ) |
This method sets the properties for outlining and grouping. The defaults correspond to Excel's defaults.
| bool | $visible | |
| bool | $symbols_below | |
| bool | $symbols_right | |
| bool | $auto_style |
Definition at line 1376 of file Worksheet.php.
| setPaper | ( | $ | size = 0 | ) |
Set the paper type. Ex. 1 = US Letter, 9 = A4
public
| integer | $size | The type of paper size to use |
Definition at line 817 of file Worksheet.php.
| setPortrait | ( | ) |
| setPrintScale | ( | $ | scale = 100 | ) |
Set the scale factor for the printed page. It turns off the "fit to page" option
public
| integer | $scale | The optional scale factor. Defaults to 100 |
Definition at line 1113 of file Worksheet.php.

| setRow | ( | $ | row, |
| $ | height, | ||
| $ | format = null, |
||
| $ | hidden = false, |
||
| $ | level = 0 |
||
| ) |
This method is used to set the height and format for a row.
public
| 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] |
Definition at line 2124 of file Worksheet.php.
| setSelection | ( | $ | first_row, |
| $ | first_column, | ||
| $ | last_row, | ||
| $ | last_column | ||
| ) |
Set which cell or cells are selected in a worksheet
public
| 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 |
Definition at line 752 of file Worksheet.php.
| setValidation | ( | $ | row1, |
| $ | col1, | ||
| $ | row2, | ||
| $ | col2, | ||
| &$ | validator | ||
| ) |
FIXME: add comments
Definition at line 3468 of file Worksheet.php.
| setVPagebreaks | ( | $ | breaks | ) |
Store the vertical page breaks on a worksheet (for printing). The breaks represent the column after which the break is inserted.
public
| array | $breaks | Array containing the vertical page breaks |
Definition at line 1081 of file Worksheet.php.
| setZoom | ( | $ | scale = 100 | ) |
Set the worksheet zoom factor.
public
| integer | $scale | The zoom factor |
Definition at line 1095 of file Worksheet.php.

| Spreadsheet_Excel_Writer_Worksheet | ( | $ | BIFF_version, |
| $ | name, | ||
| $ | index, | ||
| &$ | activesheet, | ||
| &$ | firstsheet, | ||
| &$ | str_total, | ||
| &$ | str_unique, | ||
| &$ | str_table, | ||
| &$ | url_format, | ||
| &$ | parser | ||
| ) |
Constructor
| 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 private |
Definition at line 369 of file Worksheet.php.

| thawPanes | ( | $ | panes | ) |
Set panes and mark them as unfrozen.
public
| array | $panes | This is the only parameter received and is composed of the following: 0 => Vertical split position, 1 => Horizontal split position 2 => Top row visible 3 => Leftmost column visible 4 => Active pane |
Definition at line 785 of file Worksheet.php.
| write | ( | $ | row, |
| $ | col, | ||
| $ | token, | ||
| $ | format = null |
||
| ) |
Map to the appropriate write method acording to the token recieved.
public
| 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 |
Definition at line 1136 of file Worksheet.php.


| writeBlank | ( | $ | row, |
| $ | col, | ||
| $ | format | ||
| ) |
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
public
| integer | $row | Zero indexed row |
| integer | $col | Zero indexed column |
| mixed | $format | The XF format |
Definition at line 1683 of file Worksheet.php.


| writeCol | ( | $ | row, |
| $ | col, | ||
| $ | val, | ||
| $ | format = null |
||
| ) |
Write an array of values as a column
public
| 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 |
Definition at line 1210 of file Worksheet.php.


| writeFormula | ( | $ | row, |
| $ | col, | ||
| $ | formula, | ||
| $ | format = null |
||
| ) |
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
public
| integer | $row | Zero indexed row |
| integer | $col | Zero indexed column |
| string | $formula | The formula text string |
| mixed | $format | The optional XF format |
Definition at line 1736 of file Worksheet.php.


| writeNote | ( | $ | row, |
| $ | col, | ||
| $ | note | ||
| ) |
Writes a note associated with the cell given by the row and column. NOTE records don't have a length limit.
public
| integer | $row | Zero indexed row |
| integer | $col | Zero indexed column |
| string | $note | The note to write |
Definition at line 1623 of file Worksheet.php.

| writeNumber | ( | $ | row, |
| $ | col, | ||
| $ | num, | ||
| $ | format = null |
||
| ) |
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
public
| integer | $row | Zero indexed row |
| integer | $col | Zero indexed column |
| float | $num | The number to write |
| mixed | $format | The optional XF format |
Definition at line 1411 of file Worksheet.php.


| writeRow | ( | $ | row, |
| $ | col, | ||
| $ | val, | ||
| $ | format = null |
||
| ) |
Write an array of values as a row
public
| 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 |
Definition at line 1181 of file Worksheet.php.

| writeString | ( | $ | row, |
| $ | col, | ||
| $ | str, | ||
| $ | format = null |
||
| ) |
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
public
| integer | $row | Zero indexed row |
| integer | $col | Zero indexed column |
| string | $str | The string to write |
| mixed | $format | The XF format for the cell |
Definition at line 1464 of file Worksheet.php.


| writeStringBIFF8 | ( | $ | row, |
| $ | col, | ||
| $ | str, | ||
| $ | format = null |
||
| ) |
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
public
| integer | $row | Zero indexed row |
| integer | $col | Zero indexed column |
| string | $str | The string to write |
| mixed | $format | The XF format for the cell |
Definition at line 1538 of file Worksheet.php.


| writeUrl | ( | $ | row, |
| $ | col, | ||
| $ | url, | ||
| $ | string = '', |
||
| $ | format = null |
||
| ) |
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
public
| integer | $row | Row |
| integer | $col | Column |
| string | $url | URL string |
| string | $string | Alternative label |
| mixed | $format | The cell format |
Definition at line 1814 of file Worksheet.php.


| $_active_pane |
Definition at line 152 of file Worksheet.php.
| $_colinfo |
Definition at line 134 of file Worksheet.php.
| $_dim_colmax |
Definition at line 128 of file Worksheet.php.
| $_dim_colmin |
Definition at line 121 of file Worksheet.php.
| $_dim_rowmax |
Definition at line 114 of file Worksheet.php.
| $_dim_rowmin |
Definition at line 107 of file Worksheet.php.
| $_filehandle |
Definition at line 76 of file Worksheet.php.
| $_fit_height |
Definition at line 326 of file Worksheet.php.
| $_fit_page |
Definition at line 314 of file Worksheet.php.
| $_fit_width |
Definition at line 320 of file Worksheet.php.
| $_footer |
Definition at line 188 of file Worksheet.php.
| $_frozen |
Definition at line 158 of file Worksheet.php.
| $_hcenter |
Definition at line 194 of file Worksheet.php.
| $_header |
Definition at line 182 of file Worksheet.php.
| $_input_encoding |
Definition at line 356 of file Worksheet.php.
| $_margin_bottom |
Definition at line 236 of file Worksheet.php.
| $_margin_foot |
Definition at line 212 of file Worksheet.php.
| $_margin_head |
Definition at line 206 of file Worksheet.php.
| $_margin_left |
Definition at line 218 of file Worksheet.php.
| $_margin_right |
Definition at line 224 of file Worksheet.php.
| $_margin_top |
Definition at line 230 of file Worksheet.php.
| $_merged_ranges |
Definition at line 350 of file Worksheet.php.
| $_orientation |
Definition at line 176 of file Worksheet.php.
| $_outline_below |
Definition at line 296 of file Worksheet.php.
| $_outline_on |
Definition at line 284 of file Worksheet.php.
| $_outline_right |
Definition at line 302 of file Worksheet.php.
| $_outline_row_level |
Definition at line 308 of file Worksheet.php.
| $_outline_style |
Definition at line 290 of file Worksheet.php.
| $_panes |
Definition at line 146 of file Worksheet.php.
| $_paper_size |
Definition at line 170 of file Worksheet.php.
| $_parser |
Definition at line 70 of file Worksheet.php.
| $_selection |
Definition at line 140 of file Worksheet.php.
| $_str_table |
Definition at line 344 of file Worksheet.php.
| $_str_total |
Definition at line 332 of file Worksheet.php.
| $_str_unique |
Definition at line 338 of file Worksheet.php.
| $_url_format |
Definition at line 64 of file Worksheet.php.
| $_using_tmpfile |
Definition at line 82 of file Worksheet.php.
| $_vcenter |
Definition at line 200 of file Worksheet.php.
| $_xls_colmax |
Definition at line 94 of file Worksheet.php.
| $_xls_rowmax |
Definition at line 88 of file Worksheet.php.
| $_xls_strmax |
Definition at line 100 of file Worksheet.php.
| if (($str_error==-2) or($str_error==-3)) $absolute = 0x02 |
Definition at line 2028 of file Worksheet.php.
| $data |
pack("vvvv", $row1, $row2, $col1, $col2) . $unknown1 . $link_type . $unknown2 . $up_count . $dir_short_len. $dir_short . $unknown3 . $stream_len
Definition at line 2088 of file Worksheet.php.
| $dir_long = $url |
Definition at line 2055 of file Worksheet.php.
| $dir_long_len = pack("V", strlen($dir_long) ) |
Definition at line 2078 of file Worksheet.php.
| $dir_short = "\0" |
Definition at line 2070 of file Worksheet.php.
| $dir_short_len = pack("V", strlen($dir_short) ) |
Definition at line 2077 of file Worksheet.php.
| $header = pack("vv", $record, $length) |
Definition at line 2105 of file Worksheet.php.
| $index |
Definition at line 58 of file Worksheet.php.
| $length = 0x00000 |
Definition at line 2003 of file Worksheet.php.
Definition at line 2035 of file Worksheet.php.
Definition at line 2063 of file Worksheet.php.
| $name |
Definition at line 52 of file Worksheet.php.
| $print_colmax |
Definition at line 278 of file Worksheet.php.
| $print_colmin |
Definition at line 272 of file Worksheet.php.
| $print_rowmax |
Definition at line 266 of file Worksheet.php.
| $print_rowmin |
Definition at line 260 of file Worksheet.php.
| $record = 0x01B8 |
Definition at line 2002 of file Worksheet.php.
| $selected |
Definition at line 164 of file Worksheet.php.
| if ($str== '') $str_error = $this->writeString($row1, $col1, $str, $format) |
Definition at line 2018 of file Worksheet.php.
| $stream_len = pack("V", 0) |
Definition at line 2079 of file Worksheet.php.
| $title_colmin |
Definition at line 254 of file Worksheet.php.
| $title_rowmax |
Definition at line 248 of file Worksheet.php.
| $title_rowmin |
Definition at line 242 of file Worksheet.php.
| $unknown1 = pack("H*",'D0C9EA79F9BACE118C8200AA004BA90B02000000' ) |
Definition at line 2082 of file Worksheet.php.
| $unknown2 = pack("H*",'0303000000000000C000000000000046' ) |
Definition at line 2083 of file Worksheet.php.
| $unknown3 = pack("H*",'FFFFADDE000000000000000000000000000000000000000') |
Definition at line 2084 of file Worksheet.php.
| $unknown4 = pack("v", 0x03 ) |
Definition at line 2085 of file Worksheet.php.
| $up_count = preg_match_all("/\.\.\\\/", $dir_long, $useless) |
Definition at line 2066 of file Worksheet.php.
Definition at line 2011 of file Worksheet.php.
Definition at line 2012 of file Worksheet.php.