ILIAS
eassessment Revision 61809
|
Public Member Functions | |
__construct ($BIFF_version, &$str_total, &$str_unique, &$str_table, &$colors, $parser, $preCalculateFormulas, $phpSheet) | |
Constructor. | |
close () | |
Add data to the beginning of the workbook (note the reverse order) and to the end of the workbook. | |
getData () | |
Retrieves data from memory in one chunk, or from disk in $buffer sized chunks. | |
printRowColHeaders ($print=1) | |
Set the option to print the row and column headers on the printed page. | |
setOutline ($visible=true, $symbols_below=true, $symbols_right=true, $auto_style=false) | |
This method sets the properties for outlining and grouping. | |
_writeBlank ($row, $col, $xfIndex) | |
Write a blank cell to the specified row and column (zero indexed). | |
_writeUrlRange ($row1, $col1, $row2, $col2, $url) | |
This is the more general form of _writeUrl(). | |
_writeUrlWeb ($row1, $col1, $row2, $col2, $url) | |
Used to write http, ftp and mailto hyperlinks. | |
_writeUrlInternal ($row1, $col1, $row2, $col2, $url) | |
Used to write internal reference hyperlinks such as "Sheet1!A1". | |
_writeUrlExternal ($row1, $col1, $row2, $col2, $url) | |
Write links to external directory names such as 'c:.xls', c:.xls::Sheet1!A1', '../../foo.xls'. | |
insertBitmap ($row, $col, $bitmap, $x=0, $y=0, $scale_x=1, $scale_y=1) | |
Insert a 24bit bitmap image in a worksheet. | |
_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. | |
_processBitmapGd ($image) | |
Convert a GD-image into the internal format. | |
_processBitmap ($bitmap) | |
Convert a 24 bit bitmap into the modified internal format used by Windows. | |
getEscher () | |
Get Escher object. | |
setEscher (PHPExcel_Shared_Escher $pValue=null) | |
Set Escher object. | |
Public Member Functions inherited from PHPExcel_Writer_Excel5_BIFFwriter | |
__construct () | |
Constructor. | |
_append ($data) | |
General storage function. | |
writeData ($data) | |
General storage function like _append, but returns string instead of modifying $this->_data. | |
_storeBof ($type) | |
Writes Excel BOF record to indicate the beginning of a stream or sub-stream in the BIFF file. | |
_storeEof () | |
Writes Excel EOF record to indicate the end of a BIFF stream. | |
writeEof () | |
Writes Excel EOF record to indicate the end of a BIFF stream. | |
_addContinue ($data) | |
Excel limits the size of BIFF records. |
Data Fields | |
$_xls_strmax | |
$_colinfo | |
$_selection | |
$_active_pane | |
$_outline_on | |
$_outline_style | |
$_outline_below | |
$_outline_right | |
$_str_total | |
$_str_unique | |
$_str_table | |
$record = 0x01B8 | |
$length = 0x00000 | |
$url = preg_replace('/^external:/', '', $url) | |
$absolute = 0x00 | |
if(preg_match('/^ | $link_type [A-Z]:/', $url)) = 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) | |
return | |
Data Fields inherited from PHPExcel_Writer_Excel5_BIFFwriter | |
$_BIFF_version = 0x0500 | |
$_data | |
$_datasize | |
$_limit |
Private Member Functions | |
_writeBIFF8CellRangeAddressFixed ($range= 'A1') | |
Write a cell range address in BIFF8 always fixed range See section 2.5.14 in OpenOffice.org's Documentation of the Microsoft Excel File Format. | |
_writeNumber ($row, $col, $num, $xfIndex) | |
Write a double to the specified row and column (zero indexed). | |
_writeString ($row, $col, $str, $xfIndex) | |
Write a LABELSST record or a LABEL record. | |
_writeLabel ($row, $col, $str, $xfIndex) | |
Write a string to the specified row and column (zero indexed). | |
_writeLabelSst ($row, $col, $str, $xfIndex) | |
Write a string to the specified row and column (zero indexed). | |
_writeNote ($row, $col, $note) | |
Writes a note associated with the cell given by the row and column. | |
_writeBoolErr ($row, $col, $value, $isError, $xfIndex) | |
Write a boolean or an error type to the specified row and column (zero indexed) | |
_writeFormula ($row, $col, $formula, $xfIndex, $calculatedValue) | |
Write a formula to the specified row and column (zero indexed). | |
_writeStringRecord ($stringValue) | |
Write a STRING record. | |
_writeUrl ($row, $col, $url) | |
Write a hyperlink. | |
_writeRow ($row, $height, $xfIndex, $hidden=false, $level=0) | |
This method is used to set the height and format for a row. | |
_writeDimensions () | |
Writes Excel DIMENSIONS to define the area in which there is data. | |
_writeWindow2 () | |
Write BIFF record Window2. | |
_writeDefaultRowHeight () | |
Write BIFF record DEFAULTROWHEIGHT. | |
_writeDefcol () | |
Write BIFF record DEFCOLWIDTH if COLINFO records are in use. | |
_writeColinfo ($col_array) | |
Write BIFF record COLINFO to define column widths. | |
_writeSelection () | |
Write BIFF record SELECTION. | |
_writeMergedCells () | |
Store the MERGEDCELLS records for all ranges of merged cells. | |
_writeSheetLayout () | |
Write SHEETLAYOUT record. | |
_writeSheetProtection () | |
Write SHEETPROTECTION. | |
_writeRangeProtection () | |
Write BIFF record RANGEPROTECTION. | |
_writeExterncount ($count) | |
Write BIFF record EXTERNCOUNT to indicate the number of external sheet references in a worksheet. | |
_writeExternsheet ($sheetname) | |
Writes the Excel BIFF EXTERNSHEET record. | |
_writePanes () | |
Writes the Excel BIFF PANE record. | |
_writeSetup () | |
Store the page setup SETUP BIFF record. | |
_writeHeader () | |
Store the header caption BIFF record. | |
_writeFooter () | |
Store the footer caption BIFF record. | |
_writeHcenter () | |
Store the horizontal centering HCENTER BIFF record. | |
_writeVcenter () | |
Store the vertical centering VCENTER BIFF record. | |
_writeMarginLeft () | |
Store the LEFTMARGIN BIFF record. | |
_writeMarginRight () | |
Store the RIGHTMARGIN BIFF record. | |
_writeMarginTop () | |
Store the TOPMARGIN BIFF record. | |
_writeMarginBottom () | |
Store the BOTTOMMARGIN BIFF record. | |
_writePrintHeaders () | |
Write the PRINTHEADERS BIFF record. | |
_writePrintGridlines () | |
Write the PRINTGRIDLINES BIFF record. | |
_writeGridset () | |
Write the GRIDSET BIFF record. | |
_writeGuts () | |
Write the GUTS BIFF record. | |
_writeWsbool () | |
Write the WSBOOL BIFF record, mainly for fit-to-page. | |
_writeBreaks () | |
Write the HORIZONTALPAGEBREAKS and VERTICALPAGEBREAKS BIFF records. | |
_writeProtect () | |
Set the Biff PROTECT record to indicate that the worksheet is protected. | |
_writeScenProtect () | |
Write SCENPROTECT. | |
_writeObjectProtect () | |
Write OBJECTPROTECT. | |
_writePassword () | |
Write the worksheet PASSWORD record. | |
_writeObjPicture ($colL, $dxL, $rwT, $dyT, $colR, $dxR, $rwB, $dyB) | |
Store the OBJ record that precedes an IMDATA record. | |
_writeZoom () | |
Store the window zoom factor. | |
_writeMsoDrawing () | |
Write MSODRAWING record. | |
_writeDataValidity () | |
Store the DATAVALIDATIONS and DATAVALIDATION records. | |
_mapErrorCode ($errorCode) | |
Map Error code. |
Private Attributes | |
$_parser | |
$_colors | |
Color cache. | |
$_firstRowIndex | |
$_lastRowIndex | |
$_firstColumnIndex | |
$_lastColumnIndex | |
$_phpSheet | |
$_countCellStyleXfs | |
$_escher |
Additional Inherited Members | |
Static Public Member Functions inherited from PHPExcel_Writer_Excel5_BIFFwriter | |
static | getByteOrder () |
Determine the byte order and store it as class data to avoid recalculating it for each call to new(). |
Definition at line 71 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::__construct | ( | $BIFF_version, | |
& | $str_total, | ||
& | $str_unique, | ||
& | $str_table, | ||
& | $colors, | ||
$parser, | |||
$preCalculateFormulas, | |||
$phpSheet | |||
) |
Constructor.
int | $BIFF_version | BIFF version |
int | $str_total | Total number of strings |
int | $str_unique | Total number of unique strings |
array | $str_table | |
mixed | $parser | The formula parser created for the Workbook |
string | $tempDir | The temporary directory to be used |
PHPExcel_Worksheet | $phpSheet |
Definition at line 206 of file Worksheet.php.
References $row, PHPExcel_Writer_Excel5_BIFFwriter\__construct(), and PHPExcel_Cell\columnIndexFromString().
|
private |
Map Error code.
Definition at line 2938 of file Worksheet.php.
Referenced by _writeFormula(), and close().
PHPExcel_Writer_Excel5_Worksheet::_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
The SDK incorrectly states that the height should be expressed as a percentage of 1024.
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 2429 of file Worksheet.php.
References PHPExcel_Shared_Excel5\sizeCol(), PHPExcel_Shared_Excel5\sizeRow(), and PHPExcel_Cell\stringFromColumnIndex().
PHPExcel_Writer_Excel5_Worksheet::_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 2602 of file Worksheet.php.
References $data.
PHPExcel_Writer_Excel5_Worksheet::_processBitmapGd | ( | $image | ) |
Convert a GD-image into the internal format.
private
resource | $image | The image to process |
Definition at line 2572 of file Worksheet.php.
References $data.
|
private |
Write a cell range address in BIFF8 always fixed range See section 2.5.14 in OpenOffice.org's Documentation of the Microsoft Excel File Format.
string | $range | E.g. 'A1' or 'A1:B6' |
Definition at line 514 of file Worksheet.php.
References PHPExcel_Cell\columnIndexFromString(), and PHPExcel_Cell\coordinateFromString().
PHPExcel_Writer_Excel5_Worksheet::_writeBlank | ( | $row, | |
$col, | |||
$xfIndex | |||
) |
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
integer | $row | Zero indexed row |
integer | $col | Zero indexed column |
mixed | $format | The XF format |
Definition at line 754 of file Worksheet.php.
References $data, $header, $length, $record, $row, and PHPExcel_Writer_Excel5_BIFFwriter\_append().
Referenced by close().
|
private |
Write a boolean or an error type to the specified row and column (zero indexed)
int | $row | Row index (0-based) |
int | $col | Column index (0-based) |
int | $value | |
boolean | $isError | Error or Boolean? |
int | $xfIndex |
Definition at line 774 of file Worksheet.php.
References $data, $header, $length, $record, $row, and PHPExcel_Writer_Excel5_BIFFwriter\_append().
Referenced by close().
|
private |
Write the HORIZONTALPAGEBREAKS and VERTICALPAGEBREAKS BIFF records.
Definition at line 2154 of file Worksheet.php.
References $data, PHPExcel_Worksheet\BREAK_COLUMN, PHPExcel_Worksheet\BREAK_NONE, PHPExcel_Worksheet\BREAK_ROW, PHPExcel_Cell\columnIndexFromString(), and PHPExcel_Cell\coordinateFromString().
Referenced by close().
|
private |
Write BIFF record COLINFO to define column widths.
Note: The SDK says the record length is 0x0B but Excel writes a 0x0C length record.
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 1355 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
Store the DATAVALIDATIONS and DATAVALIDATION records.
Definition at line 2781 of file Worksheet.php.
References $data, $error, $type, PHPExcel_Cell_DataValidation\OPERATOR_BETWEEN, PHPExcel_Cell_DataValidation\OPERATOR_EQUAL, PHPExcel_Cell_DataValidation\OPERATOR_GREATERTHAN, PHPExcel_Cell_DataValidation\OPERATOR_GREATERTHANOREQUAL, PHPExcel_Cell_DataValidation\OPERATOR_LESSTHAN, PHPExcel_Cell_DataValidation\OPERATOR_LESSTHANOREQUAL, PHPExcel_Cell_DataValidation\OPERATOR_NOTBETWEEN, PHPExcel_Cell_DataValidation\OPERATOR_NOTEQUAL, PHPExcel_Cell_DataValidation\STYLE_INFORMATION, PHPExcel_Cell_DataValidation\STYLE_STOP, PHPExcel_Cell_DataValidation\STYLE_WARNING, PHPExcel_Cell_DataValidation\TYPE_CUSTOM, PHPExcel_Cell_DataValidation\TYPE_DATE, PHPExcel_Cell_DataValidation\TYPE_DECIMAL, PHPExcel_Cell_DataValidation\TYPE_LIST, PHPExcel_Cell_DataValidation\TYPE_NONE, PHPExcel_Cell_DataValidation\TYPE_TEXTLENGTH, PHPExcel_Cell_DataValidation\TYPE_TIME, PHPExcel_Cell_DataValidation\TYPE_WHOLE, and PHPExcel_Shared_String\UTF8toBIFF8UnicodeLong().
Referenced by close().
|
private |
Write BIFF record DEFAULTROWHEIGHT.
Definition at line 1307 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
Write BIFF record DEFCOLWIDTH if COLINFO records are in use.
Definition at line 1329 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
Writes Excel DIMENSIONS to define the area in which there is data.
Definition at line 1217 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
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.
integer | $count | The number of external sheet references in this worksheet |
Definition at line 1657 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
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.
string | $sheetname | The name of a external worksheet |
Definition at line 1675 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
Store the footer caption BIFF record.
Definition at line 1883 of file Worksheet.php.
References $data, and PHPExcel_Shared_String\UTF8toBIFF8UnicodeLong().
Referenced by close().
|
private |
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
integer | $row | Zero indexed row |
integer | $col | Zero indexed column |
string | $formula | The formula text string |
mixed | $format | The optional XF format |
mixed | $calculatedValue | Calculated value |
Definition at line 801 of file Worksheet.php.
References $data, $error, $header, $length, $record, $row, PHPExcel_Writer_Excel5_BIFFwriter\_append(), _mapErrorCode(), _writeString(), _writeStringRecord(), and PHPExcel_Cell_DataType\getErrorCodes().
Referenced by close().
|
private |
Write the GRIDSET BIFF record.
Must be used in conjunction with the PRINTGRIDLINES record.
Definition at line 2055 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
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 2074 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
Store the horizontal centering HCENTER BIFF record.
private
Definition at line 1916 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
Store the header caption BIFF record.
Definition at line 1852 of file Worksheet.php.
References $data, and PHPExcel_Shared_String\UTF8toBIFF8UnicodeLong().
Referenced by close().
|
private |
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 653 of file Worksheet.php.
References $_xls_strmax, $data, $header, $length, $record, $row, and PHPExcel_Writer_Excel5_BIFFwriter\_append().
Referenced by _writeString().
|
private |
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 689 of file Worksheet.php.
References $data, $header, $length, $record, $row, PHPExcel_Writer_Excel5_BIFFwriter\_append(), and PHPExcel_Shared_String\UTF8toBIFF8UnicodeLong().
Referenced by _writeString().
|
private |
Store the BOTTOMMARGIN BIFF record.
Definition at line 2004 of file Worksheet.php.
References $data, and PHPExcel_Writer_Excel5_BIFFwriter\getByteOrder().
Referenced by close().
|
private |
Store the LEFTMARGIN BIFF record.
Definition at line 1947 of file Worksheet.php.
References $data, and PHPExcel_Writer_Excel5_BIFFwriter\getByteOrder().
Referenced by close().
|
private |
Store the RIGHTMARGIN BIFF record.
Definition at line 1966 of file Worksheet.php.
References $data, and PHPExcel_Writer_Excel5_BIFFwriter\getByteOrder().
Referenced by close().
|
private |
Store the TOPMARGIN BIFF record.
Definition at line 1985 of file Worksheet.php.
References $data, and PHPExcel_Writer_Excel5_BIFFwriter\getByteOrder().
Referenced by close().
|
private |
Store the MERGEDCELLS records for all ranges of merged cells.
Definition at line 1471 of file Worksheet.php.
References PHPExcel_Cell\columnIndexFromString(), PHPExcel_Cell\coordinateFromString(), and PHPExcel_Cell\splitRange().
Referenced by close().
|
private |
Write MSODRAWING record.
Definition at line 2722 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
Writes a note associated with the cell given by the row and column.
NOTE records don't have a length limit.
integer | $row | Zero indexed row |
integer | $col | Zero indexed column |
string | $note | The note to write |
Definition at line 715 of file Worksheet.php.
References $data, $header, $length, $record, $row, and PHPExcel_Writer_Excel5_BIFFwriter\_append().
|
private |
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
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 606 of file Worksheet.php.
References $data, $header, $length, $record, $row, PHPExcel_Writer_Excel5_BIFFwriter\_append(), and PHPExcel_Writer_Excel5_BIFFwriter\getByteOrder().
Referenced by close().
|
private |
Write OBJECTPROTECT.
Definition at line 2300 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
Store the OBJ record that precedes an IMDATA record.
This could be generalise to support other Excel objects.
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 2499 of file Worksheet.php.
References $data.
|
private |
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.
Definition at line 1704 of file Worksheet.php.
References $data, $row, $x, $y, PHPExcel_Cell\columnIndexFromString(), and PHPExcel_Cell\coordinateFromString().
Referenced by close().
|
private |
Write the worksheet PASSWORD record.
Definition at line 2324 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
Write the PRINTGRIDLINES BIFF record.
Must be used in conjunction with the GRIDSET record.
Definition at line 2039 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
Write the PRINTHEADERS BIFF record.
Definition at line 2023 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
Set the Biff PROTECT record to indicate that the worksheet is protected.
Definition at line 2255 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
Write BIFF record RANGEPROTECTION.
Openoffice.org's Documentaion of the Microsoft Excel File Format uses term RANGEPROTECTION for these records Microsoft Office Excel 97-2007 Binary File Format Specification uses term FEAT for these records
Definition at line 1603 of file Worksheet.php.
References PHPExcel_Shared_String\UTF8toBIFF8UnicodeLong().
Referenced by close().
|
private |
This method is used to set the height and format for a row.
integer | $row | The row to set |
integer | $height | Height we are giving to the row. Use null to set XF without setting height |
integer | $xfIndex | The optional cell style Xf index to apply to the columns |
bool | $hidden | The optional hidden attribute |
integer | $level | The optional outline level for row, in range [0,7] |
Definition at line 1167 of file Worksheet.php.
Referenced by close().
|
private |
Write SCENPROTECT.
Definition at line 2276 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
Write BIFF record SELECTION.
Definition at line 1403 of file Worksheet.php.
References $data, PHPExcel_Cell\columnIndexFromString(), PHPExcel_Cell\coordinateFromString(), and PHPExcel_Cell\splitRange().
Referenced by close().
|
private |
Store the page setup SETUP BIFF record.
Definition at line 1784 of file Worksheet.php.
References PHPExcel_Writer_Excel5_BIFFwriter\getByteOrder(), and PHPExcel_Worksheet_PageSetup\ORIENTATION_LANDSCAPE.
Referenced by close().
|
private |
Write SHEETLAYOUT record.
Definition at line 1529 of file Worksheet.php.
Referenced by close().
|
private |
Write SHEETPROTECTION.
Definition at line 1556 of file Worksheet.php.
Referenced by close().
|
private |
Write a LABELSST record or a LABEL record.
Which one depends on BIFF version
int | $row | Row index (0-based) |
int | $col | Column index (0-based) |
string | $str | The string |
int | $xfIndex | Index to XF record |
Definition at line 630 of file Worksheet.php.
References $row, _writeLabel(), and _writeLabelSst().
Referenced by _writeFormula(), and close().
|
private |
Write a STRING record.
This
string | $stringValue |
Definition at line 893 of file Worksheet.php.
References $data, $header, $length, $record, PHPExcel_Writer_Excel5_BIFFwriter\_append(), and PHPExcel_Shared_String\UTF8toBIFF8UnicodeLong().
Referenced by _writeFormula().
|
private |
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
integer | $row | Row |
integer | $col | Column |
string | $url | URL string |
Definition at line 924 of file Worksheet.php.
References $row, $url, and _writeUrlRange().
Referenced by close().
PHPExcel_Writer_Excel5_Worksheet::_writeUrlExternal | ( | $row1, | |
$col1, | |||
$row2, | |||
$col2, | |||
$url | |||
) |
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 |
Definition at line 1072 of file Worksheet.php.
Referenced by _writeUrlRange().
PHPExcel_Writer_Excel5_Worksheet::_writeUrlInternal | ( | $row1, | |
$col1, | |||
$row2, | |||
$col2, | |||
$url | |||
) |
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 |
Definition at line 1019 of file Worksheet.php.
References $data, $header, $length, $record, $unknown1, $url, PHPExcel_Writer_Excel5_BIFFwriter\_append(), PHPExcel_Shared_String\ConvertEncoding(), and PHPExcel_Shared_String\CountCharacters().
Referenced by _writeUrlRange().
PHPExcel_Writer_Excel5_Worksheet::_writeUrlRange | ( | $row1, | |
$col1, | |||
$row2, | |||
$col2, | |||
$url | |||
) |
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 |
Definition at line 946 of file Worksheet.php.
References $url, _writeUrlExternal(), _writeUrlInternal(), and _writeUrlWeb().
Referenced by _writeUrl().
PHPExcel_Writer_Excel5_Worksheet::_writeUrlWeb | ( | $row1, | |
$col1, | |||
$row2, | |||
$col2, | |||
$url | |||
) |
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 |
Definition at line 974 of file Worksheet.php.
References $data, $header, $length, $record, $unknown1, $unknown2, $url, and PHPExcel_Writer_Excel5_BIFFwriter\_append().
Referenced by _writeUrlRange().
|
private |
Store the vertical centering VCENTER BIFF record.
Definition at line 1932 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
Write BIFF record Window2.
Definition at line 1249 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
Write the WSBOOL BIFF record, mainly for fit-to-page.
Used in conjunction with the SETUP record.
Definition at line 2119 of file Worksheet.php.
References $data.
Referenced by close().
|
private |
Store the window zoom factor.
This should be a reduced fraction but for simplicity we will store all fractions with a numerator of 100.
Definition at line 2684 of file Worksheet.php.
References $data.
Referenced by close().
PHPExcel_Writer_Excel5_Worksheet::close | ( | ) |
Add data to the beginning of the workbook (note the reverse order) and to the end of the workbook.
public
Definition at line 273 of file Worksheet.php.
References $row, $url, _mapErrorCode(), PHPExcel_Writer_Excel5_BIFFwriter\_storeBof(), PHPExcel_Writer_Excel5_BIFFwriter\_storeEof(), _writeBlank(), _writeBoolErr(), _writeBreaks(), _writeColinfo(), _writeDataValidity(), _writeDefaultRowHeight(), _writeDefcol(), _writeDimensions(), _writeExterncount(), _writeExternsheet(), _writeFooter(), _writeFormula(), _writeGridset(), _writeGuts(), _writeHcenter(), _writeHeader(), _writeMarginBottom(), _writeMarginLeft(), _writeMarginRight(), _writeMarginTop(), _writeMergedCells(), _writeMsoDrawing(), _writeNumber(), _writeObjectProtect(), _writePanes(), _writePassword(), _writePrintGridlines(), _writePrintHeaders(), _writeProtect(), _writeRangeProtection(), _writeRow(), _writeScenProtect(), _writeSelection(), _writeSetup(), _writeSheetLayout(), _writeSheetProtection(), _writeString(), _writeUrl(), _writeVcenter(), _writeWindow2(), _writeWsbool(), _writeZoom(), PHPExcel_Cell\columnIndexFromString(), PHPExcel_Cell\coordinateFromString(), PHPExcel_Shared_Font\getDefaultColumnWidthByFont(), PHPExcel_Cell\stringFromColumnIndex(), PHPExcel_Cell_DataType\TYPE_BOOL, PHPExcel_Cell_DataType\TYPE_ERROR, PHPExcel_Cell_DataType\TYPE_FORMULA, PHPExcel_Cell_DataType\TYPE_NUMERIC, and PHPExcel_Cell_DataType\TYPE_STRING.
PHPExcel_Writer_Excel5_Worksheet::getData | ( | ) |
Retrieves data from memory in one chunk, or from disk in $buffer sized chunks.
Definition at line 545 of file Worksheet.php.
References PHPExcel_Writer_Excel5_BIFFwriter\$_data.
PHPExcel_Writer_Excel5_Worksheet::getEscher | ( | ) |
PHPExcel_Writer_Excel5_Worksheet::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 |
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 |
Definition at line 2355 of file Worksheet.php.
References $data, $row, $x, and $y.
PHPExcel_Writer_Excel5_Worksheet::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 565 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::setEscher | ( | PHPExcel_Shared_Escher | $pValue = null | ) |
Set Escher object.
PHPExcel_Shared_Escher | $pValue |
Definition at line 2714 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::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 579 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$_active_pane |
Definition at line 102 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$_colinfo |
Definition at line 90 of file Worksheet.php.
|
private |
Color cache.
Definition at line 149 of file Worksheet.php.
|
private |
Definition at line 186 of file Worksheet.php.
|
private |
Definition at line 193 of file Worksheet.php.
|
private |
Definition at line 167 of file Worksheet.php.
|
private |
Definition at line 155 of file Worksheet.php.
|
private |
Definition at line 173 of file Worksheet.php.
|
private |
Definition at line 161 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$_outline_below |
Definition at line 120 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$_outline_on |
Definition at line 108 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$_outline_right |
Definition at line 126 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$_outline_style |
Definition at line 114 of file Worksheet.php.
|
private |
Definition at line 78 of file Worksheet.php.
|
private |
Definition at line 179 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$_selection |
Definition at line 96 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$_str_table |
Definition at line 144 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$_str_total |
Definition at line 132 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$_str_unique |
Definition at line 138 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$_xls_strmax |
Definition at line 84 of file Worksheet.php.
Referenced by _writeLabel().
PHPExcel_Writer_Excel5_Worksheet::$absolute = 0x00 |
Definition at line 1093 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$data |
Definition at line 1133 of file Worksheet.php.
Referenced by _writeBlank(), _writeBoolErr(), _writeFormula(), _writeLabel(), _writeLabelSst(), _writeNote(), _writeNumber(), _writeStringRecord(), _writeUrlInternal(), and _writeUrlWeb().
PHPExcel_Writer_Excel5_Worksheet::$dir_long = $url |
Definition at line 1102 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$dir_long_len = pack("V", strlen($dir_long) ) |
Definition at line 1123 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$dir_short = "\0" |
Definition at line 1116 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$dir_short_len = pack("V", strlen($dir_short) ) |
Definition at line 1122 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$header = pack("vv", $record, $length) |
Definition at line 1150 of file Worksheet.php.
Referenced by _writeBlank(), _writeBoolErr(), _writeFormula(), _writeLabel(), _writeLabelSst(), _writeNote(), _writeNumber(), _writeStringRecord(), _writeUrlInternal(), and _writeUrlWeb().
PHPExcel_Writer_Excel5_Worksheet::$length = 0x00000 |
Definition at line 1081 of file Worksheet.php.
Referenced by _writeBlank(), _writeBoolErr(), _writeFormula(), _writeLabel(), _writeLabelSst(), _writeNote(), _writeNumber(), _writeStringRecord(), _writeUrlInternal(), and _writeUrlWeb().
if (preg_match('/^ PHPExcel_Writer_Excel5_Worksheet::$link_type[A-Z]:/', $url)) = 0x01 | $absolute |
Definition at line 1097 of file Worksheet.php.
if (preg_match("/\#/", $url)) PHPExcel_Writer_Excel5_Worksheet::$link_type = pack("V", $link_type) |
Definition at line 1109 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$record = 0x01B8 |
Definition at line 1080 of file Worksheet.php.
Referenced by _writeBlank(), _writeBoolErr(), _writeFormula(), _writeLabel(), _writeLabelSst(), _writeNote(), _writeNumber(), _writeStringRecord(), _writeUrlInternal(), and _writeUrlWeb().
PHPExcel_Writer_Excel5_Worksheet::$stream_len = pack("V", 0) |
Definition at line 1124 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$unknown1 = pack("H*",'D0C9EA79F9BACE118C8200AA004BA90B02000000' ) |
Definition at line 1127 of file Worksheet.php.
Referenced by _writeUrlInternal(), and _writeUrlWeb().
PHPExcel_Writer_Excel5_Worksheet::$unknown2 = pack("H*",'0303000000000000C000000000000046' ) |
Definition at line 1128 of file Worksheet.php.
Referenced by _writeUrlWeb().
PHPExcel_Writer_Excel5_Worksheet::$unknown3 = pack("H*",'FFFFADDE000000000000000000000000000000000000000') |
Definition at line 1129 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$unknown4 = pack("v", 0x03 ) |
Definition at line 1130 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$up_count = preg_match_all("/\.\.\\\/", $dir_long, $useless) |
Definition at line 1112 of file Worksheet.php.
PHPExcel_Writer_Excel5_Worksheet::$url = preg_replace('/^external:/', '', $url) |
Definition at line 1085 of file Worksheet.php.
Referenced by _writeUrl(), _writeUrlInternal(), _writeUrlRange(), _writeUrlWeb(), and close().
PHPExcel_Writer_Excel5_Worksheet::return |
Definition at line 1154 of file Worksheet.php.