Class Spreadsheet_Excel_Writer_Format

Description

Class for generating Excel XF records (formats)

  • author: Xavier Noguer <xnoguer@rezebra.com>
  • version: Release: 1.9.0
  • copyright: 1997-2006 The PHP Group

Located in /web/plugin/feature/sms_excel/lib/external/Spreadsheet/Excel/Writer/Format.php (line 45)

PEAR
   |
   --Spreadsheet_Excel_Writer_Format
Variable Summary
 integer $font_index
 integer $_bg_color
 integer $_bold
 integer $_bottom
 integer $_bottom_color
 integer $_color
 integer $_fg_color
 integer $_font_charset
 integer $_font_family
 string $_font_name
 integer $_font_outline
 integer $_font_script
 integer $_font_shadow
 integer $_hidden
 integer $_italic
 integer $_left
 integer $_left_color
 integer $_locked
 integer $_num_format
 integer $_pattern
 integer $_right
 integer $_right_color
 integer $_rotation
 integer $_size
 integer $_text_h_align
 integer $_text_justlast
 integer $_text_v_align
 integer $_text_wrap
 integer $_top
 integer $_top_color
 integer $_underline
 integer $_xf_index
Method Summary
 string getFont ()
 string getFontKey ()
 string getXf (string $style)
 integer getXfIndex ()
 void setAlign (string $location)
 void setBgColor (mixed $color)
 void setBold ([integer $weight = 1])
 void setBorder (integer $style)
 void setBorderColor (mixed $color)
 void setBottom (integer $style)
 void setBottomColor (mixed $color)
 void setColor (mixed $color)
 void setFgColor (mixed $color)
 void setFontFamily ( $font_family, string $fontfamily)
 void setHAlign (string $location)
 void setItalic ()
 void setLeft (integer $style)
 void setLeftColor (mixed $color)
 void setLocked ()
 void setMerge ()
 void setNumFormat (integer $num_format)
 void setOutLine ()
 void setPattern ([integer $arg = 1])
 void setRight (integer $style)
 void setRightColor (mixed $color)
 void setScript (integer $script)
 void setShadow ()
 void setSize (integer $size)
 void setStrikeOut ()
 void setTextRotation (integer $angle)
 void setTextWrap ()
 void setTop (integer $style)
 void setTopColor (mixed $color)
 void setUnderline (integer $underline)
 void setUnLocked ()
 void setVAlign (string $location)
Variables
integer $font_index (line 57)

Index to the FONT record.

integer $_bg_color (line 189)

The cell's background color.

integer $_bold (line 75)

Bold style

integer $_bottom (line 201)

Style of the bottom border of the cell

integer $_bottom_color (line 207)

Color of the bottom border of the cell.

integer $_color (line 87)

Index to the cell's color

integer $_fg_color (line 183)

The cell's foreground color.

integer $_font_charset (line 129)

Byte specifiying the font charset.

integer $_font_family (line 123)

Byte specifiying the font family.

string $_font_name (line 63)

The font name (ASCII).

integer $_font_outline (line 105)

Bit specifiying if the font has outline.

integer $_font_script (line 117)

2 bytes specifiying the script type for the font.

integer $_font_shadow (line 111)

Bit specifiying if the font has shadow.

integer $_font_strikeout (line 99)

Bit specifiying if the font has strikeout.

integer $_hidden (line 141)

Bit specifying if formulas are hidden.

integer $_italic (line 81)

Bit specifiying if the font is italic.

integer $_left (line 225)

Style of the left border of the cell

integer $_left_color (line 231)

Color of the left border of the cell.

integer $_locked (line 147)

Bit specifying if the cell is locked.

integer $_num_format (line 135)

An index (2 bytes) to a FORMAT record (number format).

integer $_pattern (line 195)

The cell's background fill pattern.

integer $_right (line 237)

Style of the right border of the cell

integer $_right_color (line 243)

Color of the right border of the cell.

integer $_rotation (line 177)

The two bits specifying the text rotation.

integer $_size (line 69)

Height of font (1/20 of a point)

integer $_text_h_align (line 153)

The three bits specifying the text horizontal alignment.

integer $_text_justlast (line 171)

1 bit, apparently not used.

integer $_text_v_align (line 165)

The three bits specifying the text vertical alignment.

integer $_text_wrap (line 159)

Bit specifying if the text is wrapped at the right border.

integer $_top (line 213)

Style of the top border of the cell

integer $_top_color (line 219)

Color of the top border of the cell.

integer $_underline (line 93)

The text underline property

integer $_xf_index (line 51)

The index given by the workbook when creating a new format.

Methods
getFont (line 447)

Generate an Excel BIFF FONT record.

  • return: The FONT record
string getFont ()
getFontKey (line 503)

Returns a unique hash key for a font.

Used by Spreadsheet_Excel_Writer_Workbook::_storeAllFonts()

The elements that form the key are arranged to increase the probability of generating a unique key. Elements that hold a large range of numbers (eg. _color) are placed between two binary elements such as _italic

  • return: A key for this font
string getFontKey ()
getXf (line 315)

Generate an Excel BIFF XF record (style or cell).

  • return: The XF record
string getXf (string $style)
  • string $style: The type of the XF record ('style' or 'cell').
getXfIndex (line 519)

Returns the index used by Spreadsheet_Excel_Writer_Worksheet::_XF()

  • return: The index for the XF record
integer getXfIndex ()
setAlign (line 591)

Set cell alignment.

  • access: public
void setAlign (string $location)
  • string $location: alignment for the cell ('left', 'right', etc...).
setBgColor (line 908)

Sets the cell's background color

  • access: public
void setBgColor (mixed $color)
  • mixed $color: either a string (like 'blue'), or an integer (range is [8...63]).
setBold (line 737)

Sets the boldness of the text.

Bold has a range 100..1000.

  1. (400) is normal. 1 (700) is bold.

  • access: public
void setBold ([integer $weight = 1])
  • integer $weight: Weight for the text, 0 maps to 400 (normal text),
setBorder (line 810)

Set cells borders to the same style

  • access: public
void setBorder (integer $style)
  • integer $style: style to apply for all cell borders. 1 => thin, 2 => thick.
setBorderColor (line 830)

Sets all the cell's borders to the same color

  • access: public
void setBorderColor (mixed $color)
  • mixed $color: The color we are setting. Either a string (like 'blue'), or an integer (range is [8...63]).
setBottom (line 765)

Sets the width for the bottom border of the cell

  • access: public
void setBottom (integer $style)
  • integer $style: style of the cell border. 1 => thin, 2 => thick.
setBottomColor (line 844)

Sets the cell's bottom border color

  • access: public
void setBottomColor (mixed $color)
  • mixed $color: either a string (like 'blue'), or an integer (range is [8...63]).
setColor (line 923)

Sets the cell's color

  • access: public
void setColor (mixed $color)
  • mixed $color: either a string (like 'blue'), or an integer (range is [8...63]).
setFgColor (line 893)

Sets the cell's foreground color

  • access: public
void setFgColor (mixed $color)
  • mixed $color: either a string (like 'blue'), or an integer (range is [8...63]).
setFontFamily (line 1109)

Sets the font family name.

  • access: public
void setFontFamily ( $font_family, string $fontfamily)
  • string $fontfamily: The font family name. Possible values are: 'Times New Roman', 'Arial', 'Courier'.
  • $font_family
setHAlign (line 649)

Set cell horizontal alignment.

  • access: public
void setHAlign (string $location)
  • string $location: alignment for the cell ('left', 'right', etc...).
setItalic (line 958)

Sets the font style as italic

  • access: public
void setItalic ()
setLeft (line 787)

Sets the width for the left border of the cell

  • access: public
void setLeft (integer $style)
  • integer $style: style of the cell left border. 1 => thin, 2 => thick.
setLeftColor (line 868)

Sets the cell's left border color

  • access: public
void setLeftColor (mixed $color)
  • mixed $color: either a string (like 'blue'), or an integer (range is [8...63]).
setLocked (line 1087)

Locks a cell.

  • access: public
void setLocked ()
setMerge (line 722)

This is an alias for the unintuitive setAlign('merge')

  • access: public
void setMerge ()
setNumFormat (line 1035)

Sets the numeric format.

It can be date, time, currency, etc...

  • access: public
void setNumFormat (integer $num_format)
  • integer $num_format: The numeric format.
setOutLine (line 1055)

Sets outlining for a font.

  • access: public
void setOutLine ()
setPattern (line 936)

Sets the fill pattern attribute of a cell

  • access: public
void setPattern ([integer $arg = 1])
  • integer $arg: Optional. Defaults to 1. Meaningful values are: 0-18,
    1. meaning no background.
setRight (line 798)

Sets the width for the right border of the cell

  • access: public
void setRight (integer $style)
  • integer $style: style of the cell right border. 1 => thin, 2 => thick.
setRightColor (line 880)

Sets the cell's right border color

  • access: public
void setRightColor (mixed $color)
  • mixed $color: either a string (like 'blue'), or an integer (range is [8...63]).
setScript (line 1077)

Sets the script type of the text

  • access: public
void setScript (integer $script)
  • integer $script: The value for script type. Possible values are:
    1. => superscript, 2 => subscript.
setShadow (line 1065)

Sets font as shadow.

  • access: public
void setShadow ()
setSize (line 969)

Sets the font size

  • access: public
void setSize (integer $size)
  • integer $size: The font size (in pixels I think).
setStrikeOut (line 1045)

Sets font as strikeout.

  • access: public
void setStrikeOut ()
setTextRotation (line 991)

Sets the orientation of the text

  • access: public
void setTextRotation (integer $angle)
  • integer $angle: The rotation angle for the text (clockwise). Possible
setTextWrap (line 979)

Sets text wrapping

  • access: public
void setTextWrap ()
setTop (line 776)

Sets the width for the top border of the cell

  • access: public
void setTop (integer $style)
  • integer $style: style of the cell top border. 1 => thin, 2 => thick.
setTopColor (line 856)

Sets the cell's top border color

  • access: public
void setTopColor (mixed $color)
  • mixed $color: either a string (like 'blue'), or an integer (range is [8...63]).
setUnderline (line 948)

Sets the underline of the text

  • access: public
void setUnderline (integer $underline)
  • integer $underline: The value for underline. Possible values are:
    1. => underline, 2 => double underline.
setUnLocked (line 1097)

Unlocks a cell. Useful for unprotecting particular cells of a protected sheet.

  • access: public
void setUnLocked ()
setVAlign (line 689)

Set cell vertical alignment.

  • access: public
void setVAlign (string $location)
  • string $location: alignment for the cell ('top', 'vleft', 'vright', etc...).

Inherited Methods

Inherited From PEAR

 PEAR::PEAR()
 PEAR::delExpect()
 PEAR::expectError()
 PEAR::getStaticProperty()
 PEAR::isError()
 PEAR::loadExtension()
 PEAR::popErrorHandling()
 PEAR::popExpect()
 PEAR::pushErrorHandling()
 PEAR::raiseError()
 PEAR::registerShutdownFunc()
 PEAR::setErrorHandling()
 PEAR::staticPopErrorHandling()
 PEAR::staticPushErrorHandling()
 PEAR::throwError()
 PEAR::_PEAR()

Documentation generated on Wed, 09 Feb 2011 09:01:11 +0700 by phpDocumentor 1.4.2