FreenetIS
 All Classes Namespaces Functions Variables Pages
Public Member Functions | List of all members
ExcelWriterXML_Style Class Reference

Public Member Functions

 ExcelWriterXML_Style ($id)
 Constructor for a style.
 getID ()
 Returns the named style for this style.
 getStyleXML ()
 Retrieves the XML string data for a style.
 checkColor ($color)
 Checks whether a color is valid for the spreadsheet.
 getErrors ()
 Returns any errors found in the sheet.
 name ($name)
 Changes the name of the named style.
 alignVertical ($valign)
 Changes the vertical alignment setting for the style.
 alignHorizontal ($halign)
 Changes the horizontal alignment setting for the style.
 alignRotate ($rotate)
 Changes the rotation setting for the style.
 alignShrinktofit ()
 Changes the Shrink To Fit setting for the style ShrinkToFit shrinks the text so that it fits within the cell.
 alignVerticaltext ()
 Changes the Vertical Text setting for the style.
 alignWraptext ()
 Changes the Wrap Text setting for the style.
 fontSize ($fontSize=10)
 Changes the size of the font.
 fontColor ($fontColor= 'Automatic')
 Changes the color for the font.
 fontName ($fontName= 'Arial')
 Changes the font for the cell.
 fontFamily ($fontFamily= 'Swiss')
 Changes the family for the font.
 fontBold ()
 Makes the font bold for the named style.
 fontItalic ()
 Makes the font italic for the named style.
 fontStrikethrough ()
 Makes the font strikethrough for the named style.
 fontUnderline ($uStyle= 'Single')
 Makes the font underlined for the named style.
 fontShadow ()
 Makes the font shadowed for the named style.
 fontOutline ()
 Makes the font outlines for the named style.
 border ($position= 'All', $weight= '1', $color= 'Automatic', $linestyle= 'Continuous')
 Sets the border for the named style.
 bgColor ($color= 'Yellow', $pattern= 'Solid', $patternColor=null)
 Sets the background style of a style.
 bgPattern ($pattern= 'None', $color=null)
 Sets the background pattern of a style.
 bgPatternColor ($color= 'Yellow')
 Specifies the secondary fill color of the cell when Pattern does not equal Solid.
 numberFormat ($formatString)
 Sets the number format of a style.
 numberFormatDate ()
 Sets a default date format for a style.
 numberFormatTime ()
 Sets a default time format for a style.
 numberFormatDatetime ()
 Sets a default date and time format for a style.

Member Function Documentation

ExcelWriterXML_Style::alignHorizontal (   $halign)

Changes the horizontal alignment setting for the style.

Parameters
string$halignThe value for the horizontal alignment. Acceptable values are "Automatic" "Left" "Center" "Right"
ExcelWriterXML_Style::alignRotate (   $rotate)

Changes the rotation setting for the style.

Parameters
mixed$rotateThe value for the Rotation. Value must be a number between -90 and 90
ExcelWriterXML_Style::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.

ExcelWriterXML_Style::alignVertical (   $valign)

Changes the vertical alignment setting for the style.

Parameters
string$valignThe value for the vertical alignment. Acceptable values are "Automatic" "Top" "Bottom" "Center"
ExcelWriterXML_Style::alignVerticaltext ( )

Changes the Vertical Text setting for the style.

Text will be displayed vertically.

ExcelWriterXML_Style::bgColor (   $color = 'Yellow',
  $pattern = 'Solid',
  $patternColor = null 
)

Sets the background style of a style.

Parameters
string$colorNamed color from MS or web color in HEX format (e.g. #ff00ff
string$patternDefaults to a None if not supplied.
string$patternColorDefaults to a Automatic if not supplied.
ExcelWriterXML_Style::bgPattern (   $pattern = 'None',
  $color = null 
)

Sets the background pattern of a style.

See Also
bgColor()
Parameters
string$colorNamed color from MS or web color in HEX format (e.g. #ff00ff
string$patternDefaults to a solid if not supplied.
ExcelWriterXML_Style::bgPatternColor (   $color = 'Yellow')

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

See Also
function bgPattern()
Parameters
string$colorNamed color from MS or web color in HEX format (e.g. #ff00ff
string$patternDefaults to a solid if not supplied.
ExcelWriterXML_Style::border (   $position = 'All',
  $weight = '1',
  $color = 'Automatic',
  $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.

Parameters
string$positionSets which side of the cell should be modified. Acceptable values are "All" "Left" "Top" "Right" "Bottom" "DiagonalLeft" "DiagonalRight"
integer$weightThickness of the border. Default is 1 "Thin"
string$colorColor 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$linestyleType of line to use on the border. Default is "Continuous". Acceptable balues are "None" "Continuous" "Dash" "Dot" "DashDot" "DashDotDot" "SlantDashDot" "Double"
ExcelWriterXML_Style::checkColor (   $color)

Checks whether a color is valid for the spreadsheet.

@param string $color Named color from MS or web color in HEX format (e.g.

#ff00ff

Returns
mixed Either the valid color in HEX format or false if the color is not valid
ExcelWriterXML_Style::ExcelWriterXML_Style (   $id)

Constructor for a style.

Parameters
string$idThe named style referenced by Excel. This is called by ExcelWriterXML object when adding a style
ExcelWriterXML_Style::fontColor (   $fontColor = 'Automatic')

Changes the color for the font.

Parameters
string$fontColorThe value for the Color. This can be a MS named color or a Hex web color.
ExcelWriterXML_Style::fontFamily (   $fontFamily = 'Swiss')

Changes the family for the font.

Parameters
string$fontFamilyThe value for the font family. Not really sure what this does. Win32-dependant font family. Values can be "Automatic" "Decorative" "Modern" "Roman" "Script" "Swiss"
ExcelWriterXML_Style::fontName (   $fontName = 'Arial')

Changes the font for the cell.

Parameters
string$fontNameThe value for the font name. This should be a standard windows font available on most systems.
ExcelWriterXML_Style::fontSize (   $fontSize = 10)

Changes the size of the font.

Parameters
string$fontSizeThe value for the Size. Value must be greater than zero
ExcelWriterXML_Style::fontUnderline (   $uStyle = 'Single')

Makes the font underlined for the named style.

Parameters
string$uStyleThe type of underlining for the style. Acceptable values are "None" "Single" "Double" "SingleAccounting" "DoubleAccounting"
ExcelWriterXML_Style::getErrors ( )

Returns any errors found in the sheet.

Returns
mixed Array of errors if they exist, otherwise false
ExcelWriterXML_Style::getID ( )

Returns the named style for this style.

Returns
string $id The id for this style
ExcelWriterXML_Style::getStyleXML ( )

Retrieves the XML string data for a style.

Called by ExcelWriterXML object

Returns
string Returns the formatted XML data <style>...</style>
ExcelWriterXML_Style::name (   $name)

Changes the name of the named style.

Parameters
string$nameThe named style referenced by Excel.
ExcelWriterXML_Style::numberFormat (   $formatString)

Sets the number format of a style.

Parameters
string$formatStringFormat string to be used by Excel for displaying the number.

The documentation for this class was generated from the following file: