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. |
ExcelWriterXML_Style::alignHorizontal | ( | $halign | ) |
Changes the horizontal alignment setting for the style.
string | $halign | The value for the horizontal alignment. Acceptable values are "Automatic" "Left" "Center" "Right" |
ExcelWriterXML_Style::alignRotate | ( | $rotate | ) |
Changes the rotation setting for the style.
mixed | $rotate | The 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.
string | $valign | The value for the vertical alignment. Acceptable values are "Automatic" "Top" "Bottom" "Center" |
ExcelWriterXML_Style::alignVerticaltext | ( | ) |
ExcelWriterXML_Style::bgColor | ( | $color = 'Yellow' , |
|
$pattern = 'Solid' , |
|||
$patternColor = null |
|||
) |
Sets the background style of a style.
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. |
ExcelWriterXML_Style::bgPattern | ( | $pattern = 'None' , |
|
$color = null |
|||
) |
Sets the background pattern of a style.
string | $color | Named color from MS or web color in HEX format (e.g. #ff00ff |
string | $pattern | Defaults 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.
string | $color | Named color from MS or web color in HEX format (e.g. #ff00ff |
string | $pattern | Defaults 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.
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" |
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
ExcelWriterXML_Style::ExcelWriterXML_Style | ( | $id | ) |
Constructor for a style.
string | $id | The 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.
string | $fontColor | The 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.
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" |
ExcelWriterXML_Style::fontName | ( | $fontName = 'Arial' | ) |
Changes the font for the cell.
string | $fontName | The 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.
string | $fontSize | The value for the Size. Value must be greater than zero |
ExcelWriterXML_Style::fontUnderline | ( | $uStyle = 'Single' | ) |
Makes the font underlined for the named style.
string | $uStyle | The type of underlining for the style. Acceptable values are "None" "Single" "Double" "SingleAccounting" "DoubleAccounting" |
ExcelWriterXML_Style::getErrors | ( | ) |
Returns any errors found in the sheet.
ExcelWriterXML_Style::getID | ( | ) |
Returns the named style for this style.
ExcelWriterXML_Style::getStyleXML | ( | ) |
Retrieves the XML string data for a style.
Called by ExcelWriterXML object
ExcelWriterXML_Style::name | ( | $name | ) |
Changes the name of the named style.
string | $name | The named style referenced by Excel. |
ExcelWriterXML_Style::numberFormat | ( | $formatString | ) |
Sets the number format of a style.
string | $formatString | Format string to be used by Excel for displaying the number. |