PHPExcel_Worksheet

# Class: PHPExcel_Worksheet_HeaderFooter Source Location: /PHPExcel/Worksheet/HeaderFooter.php
### Class Overview
PHPExcel_Worksheet_HeaderFooter #### Author(s): #### Copyright: Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel) | ### Variables $_alignWithMargins $_differentFirst $_differentOddEven $_evenFooter $_evenHeader $_firstFooter $_firstHeader $_headerFooterImages $_oddFooter $_oddHeader $_scaleWithDocument | ### Constants IMAGE_FOOTER_CENTER IMAGE_FOOTER_LEFT IMAGE_FOOTER_RIGHT IMAGE_HEADER_CENTER IMAGE_HEADER_LEFT IMAGE_HEADER_RIGHT | ### Methods __construct addImage getAlignWithMargins getDifferentFirst getDifferentOddEven getEvenFooter getEvenHeader getFirstFooter getFirstHeader getImages getOddFooter getOddHeader getScaleWithDocument removeImage setAlignWithMargins setDifferentFirst setDifferentOddEven setEvenFooter setEvenHeader setFirstFooter setFirstHeader setImages setOddFooter setOddHeader setScaleWithDocument __clone
### Class Details [line 108] PHPExcel_Worksheet_HeaderFooter PHPExcel_Worksheet_HeaderFooter Header/Footer Formatting Syntax taken from Office Open XML Part 4 - Markup Language Reference, page 1970: There are a number of formatting codes that can be written inline with the actual header / footer text, which affect the formatting in the header or footer. Example: This example shows the text "Center Bold Header" on the first line (center section), and the date on the second line (center section). &CCenter &"-,Bold"Bold&"-,Regular"Header_x000A_&D General Rules: There is no required order in which these codes must appear. The first occurrence of the following codes turns the formatting ON, the second occurrence turns it OFF again: - strikethrough - superscript - subscript Superscript and subscript cannot both be ON at same time. Whichever comes first wins and the other is ignored, while the first is ON. &L - code for "left section" (there are three header / footer locations, "left", "center", and "right"). When two or more occurrences of this section marker exist, the contents from all markers are concatenated, in the order of appearance, and placed into the left section. &P - code for "current page #" &N - code for "total pages" &font size - code for "text font size", where font size is a font size in points. &K - code for "text font color" RGB Color is specified as RRGGBB Theme Color is specifed as TTSNN where TT is the theme color Id, S is either "+" or "-" of the tint/shade value, NN is the tint/shade value. &S - code for "text strikethrough" on / off &X - code for "text super script" on / off &Y - code for "text subscript" on / off &C - code for "center section". When two or more occurrences of this section marker exist, the contents from all markers are concatenated, in the order of appearance, and placed into the center section. &D - code for "date" &T - code for "time" &G - code for "picture as background" &U - code for "text single underline" &E - code for "double underline" &R - code for "right section". When two or more occurrences of this section marker exist, the contents from all markers are concatenated, in the order of appearance, and placed into the right section. &Z - code for "this workbook's file path" &F - code for "this workbook's file name" &A - code for "sheet tab name" &+ - code for add to page #. &- - code for subtract from page #. &"font name,font type" - code for "text font name" and "text font type", where font name and font type are strings specifying the name and type of the font, separated by a comma. When a hyphen appears in font name, it means "none specified". Both of font name and font type can be localized values. &"-,Bold" - code for "bold font style" &B - also means "bold font style". &"-,Regular" - code for "regular font style" &"-,Italic" - code for "italic font style" &I - also means "italic font style" &"-,Bold Italic" code for "bold italic font style" &O - code for "outline style" &H - code for "shadow style" #### Tags:
copyright: | Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
[ Top ] ### Class Variables #### $_alignWithMargins = [line 186] Align with margins, defaults to true Align with margins, defaults to true #### Tags:
access: | private
Type: | boolean
[ Top ] #### $_differentFirst = [line 172] Different header for first page, defaults to false Different header for first page, defaults to false #### Tags:
access: | private
Type: | boolean
[ Top ] #### $_differentOddEven = [line 165] Different header for Odd/Even, defaults to false Different header for Odd/Even, defaults to false #### Tags:
access: | private
Type: | boolean
[ Top ] #### $_evenFooter = [line 144] EvenFooter EvenFooter #### Tags:
access: | private
Type: | string
[ Top ] #### $_evenHeader = [line 137] EvenHeader EvenHeader #### Tags:
access: | private
Type: | string
[ Top ] #### $_firstFooter = [line 158] FirstFooter FirstFooter #### Tags:
access: | private
Type: | string
[ Top ] #### $_firstHeader = [line 151] FirstHeader FirstHeader #### Tags:
access: | private
Type: | string
[ Top ] #### $_headerFooterImages = array() [line 193] Header/footer images Header/footer images #### Tags:
access: | private
Type: | PHPExcel_Worksheet_HeaderFooterDrawing[]
[ Top ] #### $_oddFooter = [line 130] OddFooter OddFooter #### Tags:
access: | private
Type: | string
[ Top ] #### $_oddHeader = [line 123] OddHeader OddHeader #### Tags:
access: | private
Type: | string
[ Top ] #### $_scaleWithDocument = [line 179] Scale with document, defaults to true Scale with document, defaults to true #### Tags:
access: | private
Type: | boolean
[ Top ] ### Class Methods ### constructor __construct [line 198]
`PHPExcel_Worksheet_HeaderFooter __construct( )`
Create a new PHPExcel_Worksheet_HeaderFooter Create a new PHPExcel_Worksheet_HeaderFooter #### Tags:
access: | public
[ Top ] ### method addImage [line 422]
`PHPExcel_Worksheet_HeaderFooter addImage( [PHPExcel_Worksheet_HeaderFooterDrawing $image = null], [string $location = self::IMAGE_HEADER_LEFT])`
Add header/footer image Add header/footer image #### Tags:
throws: | Exception
access: | public
#### Parameters:
PHPExcel_Worksheet_HeaderFooterDrawing | $image |
string | $location |
[ Top ] ### method getAlignWithMargins [line 399]
`boolean getAlignWithMargins( )`
Get AlignWithMargins Get AlignWithMargins #### Tags:
access: | public
[ Top ] ### method getDifferentFirst [line 359]
`boolean getDifferentFirst( )`
Get DifferentFirst Get DifferentFirst #### Tags:
access: | public
[ Top ] ### method getDifferentOddEven [line 339]
`boolean getDifferentOddEven( )`
Get DifferentOddEven Get DifferentOddEven #### Tags:
access: | public
[ Top ] ### method getEvenFooter [line 279]
`string getEvenFooter( )`
Get EvenFooter Get EvenFooter #### Tags:
access: | public
[ Top ] ### method getEvenHeader [line 259]
`string getEvenHeader( )`
Get EvenHeader Get EvenHeader #### Tags:
access: | public
[ Top ] ### method getFirstFooter [line 319]
`string getFirstFooter( )`
Get FirstFooter Get FirstFooter #### Tags:
access: | public
[ Top ] ### method getFirstHeader [line 299]
`string getFirstHeader( )`
Get FirstHeader Get FirstHeader #### Tags:
access: | public
[ Top ] ### method getImages [line 462]
`PHPExcel_Worksheet_HeaderFooterDrawing[] getImages( )`
Get header/footer images Get header/footer images #### Tags:
access: | public
[ Top ] ### method getOddFooter [line 239]
`string getOddFooter( )`
Get OddFooter Get OddFooter #### Tags:
access: | public
[ Top ] ### method getOddHeader [line 219]
`string getOddHeader( )`
Get OddHeader Get OddHeader #### Tags:
access: | public
[ Top ] ### method getScaleWithDocument [line 379]
`boolean getScaleWithDocument( )`
Get ScaleWithDocument Get ScaleWithDocument #### Tags:
access: | public
[ Top ] ### method removeImage [line 434]
`PHPExcel_Worksheet_HeaderFooter removeImage( [string $location = self::IMAGE_HEADER_LEFT])`
Remove header/footer image Remove header/footer image #### Tags:
throws: | Exception
access: | public
#### Parameters:
string | $location |
[ Top ] ### method setAlignWithMargins [line 409]
`PHPExcel_Worksheet_HeaderFooter setAlignWithMargins( [boolean $pValue = true])`
Set AlignWithMargins Set AlignWithMargins #### Tags:
access: | public
#### Parameters:
boolean | $pValue |
[ Top ] ### method setDifferentFirst [line 369]
`PHPExcel_Worksheet_HeaderFooter setDifferentFirst( [boolean $pValue = false])`
Set DifferentFirst Set DifferentFirst #### Tags:
access: | public
#### Parameters:
boolean | $pValue |
[ Top ] ### method setDifferentOddEven [line 349]
`PHPExcel_Worksheet_HeaderFooter setDifferentOddEven( [boolean $pValue = false])`
Set DifferentOddEven Set DifferentOddEven #### Tags:
access: | public
#### Parameters:
boolean | $pValue |
[ Top ] ### method setEvenFooter [line 289]
`PHPExcel_Worksheet_HeaderFooter setEvenFooter( string $pValue)`
Set EvenFooter Set EvenFooter #### Tags:
access: | public
#### Parameters:
string | $pValue |
[ Top ] ### method setEvenHeader [line 269]
`PHPExcel_Worksheet_HeaderFooter setEvenHeader( string $pValue)`
Set EvenHeader Set EvenHeader #### Tags:
access: | public
#### Parameters:
string | $pValue |
[ Top ] ### method setFirstFooter [line 329]
`PHPExcel_Worksheet_HeaderFooter setFirstFooter( string $pValue)`
Set FirstFooter Set FirstFooter #### Tags:
access: | public
#### Parameters:
string | $pValue |
[ Top ] ### method setFirstHeader [line 309]
`PHPExcel_Worksheet_HeaderFooter setFirstHeader( string $pValue)`
Set FirstHeader Set FirstHeader #### Tags:
access: | public
#### Parameters:
string | $pValue |
[ Top ] ### method setImages [line 448]
`PHPExcel_Worksheet_HeaderFooter setImages( PHPExcel_Worksheet_HeaderFooterDrawing[] $images)`
Set header/footer images Set header/footer images #### Tags:
throws: | Exception
access: | public
#### Parameters:
PHPExcel_Worksheet_HeaderFooterDrawing[] | $images |
[ Top ] ### method setOddFooter [line 249]
`PHPExcel_Worksheet_HeaderFooter setOddFooter( string $pValue)`
Set OddFooter Set OddFooter #### Tags:
access: | public
#### Parameters:
string | $pValue |
[ Top ] ### method setOddHeader [line 229]
`PHPExcel_Worksheet_HeaderFooter setOddHeader( string $pValue)`
Set OddHeader Set OddHeader #### Tags:
access: | public
#### Parameters:
string | $pValue |
[ Top ] ### method setScaleWithDocument [line 389]
`PHPExcel_Worksheet_HeaderFooter setScaleWithDocument( [boolean $pValue = true])`
Set ScaleWithDocument Set ScaleWithDocument #### Tags:
access: | public
#### Parameters:
boolean | $pValue |
[ Top ] ### method __clone [line 479]
`void __clone( )`
Implement PHP __clone to create a deep clone, not just a shallow copy. Implement PHP __clone to create a deep clone, not just a shallow copy. #### Tags:
access: | public
[ Top ] ### Class Constants #### IMAGE_FOOTER_CENTER = 'CF' [line 115] [ Top ] #### IMAGE_FOOTER_LEFT = 'LF' [line 114] [ Top ] #### IMAGE_FOOTER_RIGHT = 'RF' [line 116] [ Top ] #### IMAGE_HEADER_CENTER = 'CH' [line 112] [ Top ] #### IMAGE_HEADER_LEFT = 'LH' [line 111] [ Top ] #### IMAGE_HEADER_RIGHT = 'RH' [line 113] [ Top ] Documentation generated on Mon, 11 Jan 2010 08:11:14 +0100 by phpDocumentor 1.4.1