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

Class: ExcelWriterXML_Style

Source Location: /ExcelWriterXML_Style.php

Class Overview


Style class for generating Excel styles


Author(s):

  • Robert F Greer

Version:

  • 1.0

Methods



Class Details

[line 14]
Style class for generating Excel styles



Tags:

author:  Robert F Greer
version:  1.0
link:  http://msdn.microsoft.com/en-us/library/aa140066(office.10).aspx


[ Top ]


Class Methods


constructor ExcelWriterXML_Style [line 221]

ExcelWriterXML_Style ExcelWriterXML_Style( string $id)

Constructor for a style



Parameters:

string   $id   The named style referenced by Excel. This is called by ExcelWriterXML object when adding a style

[ Top ]

method alignHorizontal [line 423]

void alignHorizontal( string $halign)

Changes the horizontal alignment setting for the style



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


Parameters:

string   $halign   The value for the horizontal alignment. Acceptable values are "Automatic" "Left" "Center" "Right"

[ Top ]

method alignRotate [line 441]

void alignRotate( mixed $rotate)

Changes the rotation setting for the style



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


Parameters:

mixed   $rotate   The value for the Rotation. Value must be a number between -90 and 90

[ Top ]

method alignShrinktofit [line 460]

void alignShrinktofit( )

Changes the Shrink To Fit setting for the style ShrinkToFit shrinks the text so that it fits within the cell.

This doesn't actually work.




Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


[ Top ]

method alignVertical [line 405]

void alignVertical( string $valign)

Changes the vertical alignment setting for the style



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


Parameters:

string   $valign   The value for the vertical alignment. Acceptable values are "Automatic" "Top" "Bottom" "Center"

[ Top ]

method alignVerticaltext [line 469]

void alignVerticaltext( )

Changes the Vertical Text setting for the style.

Text will be displayed vertically.




Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


[ Top ]

method alignWraptext [line 477]

void alignWraptext( )

Changes the Wrap Text setting for the style.



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


[ Top ]

method bgColor [line 702]

void bgColor( [string $color = 'Yellow'], [string $pattern = 'Solid'], [string $patternColor = null])

Sets the background style of a style



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


Parameters:

string   $color   Named color from MS or web color in HEX format (e.g. #ff00ff
string   $pattern   Defaults to a None if not supplied.
string   $patternColor   Defaults to a Automatic if not supplied.

[ Top ]

method bgPattern [line 724]

void bgPattern( [string $pattern = 'None'], [string $color = null])

Sets the background pattern of a style.



Tags:

see:  ExcelWriterXML_Style::bgColor()
access:  public
usedby:  ExcelWriterXML_Sheet


Parameters:

string   $color   Named color from MS or web color in HEX format (e.g. #ff00ff
string   $pattern   Defaults to a solid if not supplied.

[ Top ]

method bgPatternColor [line 764]

void bgPatternColor( [string $color = 'Yellow'], string $pattern)

Specifies the secondary fill color of the cell when Pattern does not equal Solid.



Tags:

see:  function bgPattern()
access:  public
usedby:  ExcelWriterXML_Sheet


Parameters:

string   $color   Named color from MS or web color in HEX format (e.g. #ff00ff
string   $pattern   Defaults to a solid if not supplied.

[ Top ]

method border [line 630]

void border( [string $position = 'All'], [integer $weight = '1'], [string $color = 'Automatic'], [string $linestyle = 'Continuous'])

Sets the border for the named style.

This function can be called multiple times to set different sides of the cell or set all sides the same at once.




Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


Parameters:

string   $position   Sets which side of the cell should be modified. Acceptable values are "All" "Left" "Top" "Right" "Bottom" "DiagonalLeft" "DiagonalRight"
integer   $weight   Thickness of the border. Default is 1 "Thin"
string   $color   Color of the border. Default is "Automatic" but any 6-hexadecimal digit number in "#rrggbb" format or it can be any of the Microsoft® Internet Explorer named colors
string   $linestyle   Type of line to use on the border. Default is "Continuous". Acceptable balues are "None" "Continuous" "Dash" "Dot" "DashDot" "DashDotDot" "SlantDashDot" "Double"

[ Top ]

method checkColor [line 349]

mixed checkColor( string $color)

Checks whether a color is valid for the spreadsheet



Tags:

return:  Either the valid color in HEX format or false if the color is not valid
access:  public
usedby:  ExcelWriterXML_Sheet


Parameters:

string   $color   Named color from MS or web color in HEX format (e.g. #ff00ff

[ Top ]

method fontBold [line 555]

void fontBold( )

Makes the font bold for the named style



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


[ Top ]

method fontColor [line 507]

void fontColor( [string $fontColor = 'Automatic'])

Changes the color for the font



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


Parameters:

string   $fontColor   The value for the Color. This can be a MS named color or a Hex web color.

[ Top ]

method fontFamily [line 536]

void fontFamily( [string $fontFamily = 'Swiss'])

Changes the family for the font



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


Parameters:

string   $fontFamily   The value for the font family. Not really sure what this does. Win32-dependant font family. Values can be "Automatic" "Decorative" "Modern" "Roman" "Script" "Swiss"

[ Top ]

method fontItalic [line 563]

void fontItalic( )

Makes the font italic for the named style



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


[ Top ]

method fontName [line 523]

void fontName( [string $fontName = 'Arial'])

Changes the font for the cell



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


Parameters:

string   $fontName   The value for the font name. This should be a standard windows font available on most systems.

[ Top ]

method fontOutline [line 607]

void fontOutline( )

Makes the font outlines for the named style



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


[ Top ]

method fontShadow [line 599]

void fontShadow( )

Makes the font shadowed for the named style



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


[ Top ]

method fontSize [line 489]

void fontSize( [string $fontSize = 10])

Changes the size of the font



Tags:

access:  public


Parameters:

string   $fontSize   The value for the Size. Value must be greater than zero

[ Top ]

method fontStrikethrough [line 571]

void fontStrikethrough( )

Makes the font strikethrough for the named style



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


[ Top ]

method fontUnderline [line 582]

void fontUnderline( [string $uStyle = 'Single'])

Makes the font underlined for the named style



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


Parameters:

string   $uStyle   The type of underlining for the style. Acceptable values are "None" "Single" "Double" "SingleAccounting" "DoubleAccounting"

[ Top ]

method getErrors [line 385]

mixed getErrors( )

Returns any errors found in the sheet



Tags:

return:  Array of errors if they exist, otherwise false
access:  public
usedby:  ExcelWriterXML_Sheet


[ Top ]

method getID [line 230]

string getID( )

Returns the named style for this style



Tags:

return:  The id for this style
access:  public
usedby:  ExcelWriterXML_Sheet


[ Top ]

method getStyleXML [line 239]

string getStyleXML( )

Retrieves the XML string data for a style.

Called by ExcelWriterXML object




Tags:

return:  Returns the formatted XML data <style>...</style>
access:  public
usedby:  ExcelWriterXML_Sheet


[ Top ]

method name [line 396]

void name( string $name)

Changes the name of the named style



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


Parameters:

string   $name   The named style referenced by Excel.

[ Top ]

method numberFormat [line 787]

void numberFormat( string $formatString)

Sets the number format of a style



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


Parameters:

string   $formatString   Format string to be used by Excel for displaying the number.

[ Top ]

method numberFormatDate [line 792]

void numberFormatDate( )

Sets a default date format for a style



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


[ Top ]

method numberFormatDatetime [line 802]

void numberFormatDatetime( )

Sets a default date and time format for a style



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


[ Top ]

method numberFormatTime [line 797]

void numberFormatTime( )

Sets a default time format for a style



Tags:

access:  public
usedby:  ExcelWriterXML_Sheet


[ Top ]


Documentation generated on Wed, 16 Feb 2011 20:04:38 -0600 by phpDocumentor 1.4.3