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

Class: Spreadsheet_Excel_Writer_Format

Source Location: /Spreadsheet_Excel_Writer-0.9.1/Writer/Format.php

Class Overview

PEAR
   |
   --Spreadsheet_Excel_Writer_Format

Class for generating Excel XF records (formats)


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 45]
Class for generating Excel XF records (formats)


[ Top ]


Class Variables

$font_index =

[line 57]

Index to the FONT record.

Type:   integer


[ Top ]



Method Detail

getFont   [line 447]

string getFont( )

Generate an Excel BIFF FONT record.
  • Return: The FONT record

[ Top ]

getFontKey   [line 503]

string getFontKey( )

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

[ Top ]

getXf   [line 315]

string getXf( string $style)

Generate an Excel BIFF XF record (style or cell).
  • Return: The XF record

Parameters:

string   $style     The type of the XF record ('style' or 'cell').

[ Top ]

getXfIndex   [line 519]

integer getXfIndex( )

Returns the index used by Spreadsheet_Excel_Writer_Worksheet::_XF()
  • Return: The index for the XF record

[ Top ]

setAlign   [line 591]

void setAlign( string $location)

Set cell alignment.
  • Access: public

Parameters:

string   $location     alignment for the cell ('left', 'right', etc...).

[ Top ]

setBgColor   [line 908]

void setBgColor( mixed $color)

Sets the cell's background color
  • Access: public

Parameters:

mixed   $color     either a string (like 'blue'), or an integer (range is [8...63]).

[ Top ]

setBold   [line 737]

void setBold( [integer $weight = 1])

Sets the boldness of the text.

Bold has a range 100..1000.

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

  • Access: public

Parameters:

integer   $weight     Weight for the text, 0 maps to 400 (normal text),

[ Top ]

setBorder   [line 810]

void setBorder( integer $style)

Set cells borders to the same style
  • Access: public

Parameters:

integer   $style     style to apply for all cell borders. 1 => thin, 2 => thick.

[ Top ]

setBorderColor   [line 830]

void setBorderColor( mixed $color)

Sets all the cell's borders to the same color
  • Access: public

Parameters:

mixed   $color     The color we are setting. Either a string (like 'blue'), or an integer (range is [8...63]).

[ Top ]

setBottom   [line 765]

void setBottom( integer $style)

Sets the width for the bottom border of the cell
  • Access: public

Parameters:

integer   $style     style of the cell border. 1 => thin, 2 => thick.

[ Top ]

setBottomColor   [line 844]

void setBottomColor( mixed $color)

Sets the cell's bottom border color
  • Access: public

Parameters:

mixed   $color     either a string (like 'blue'), or an integer (range is [8...63]).

[ Top ]

setColor   [line 923]

void setColor( mixed $color)

Sets the cell's color
  • Access: public

Parameters:

mixed   $color     either a string (like 'blue'), or an integer (range is [8...63]).

[ Top ]

setFgColor   [line 893]

void setFgColor( mixed $color)

Sets the cell's foreground color
  • Access: public

Parameters:

mixed   $color     either a string (like 'blue'), or an integer (range is [8...63]).

[ Top ]

setFontFamily   [line 1097]

void setFontFamily( mixed $font_family, string $fontfamily)

Sets the font family name.
  • Access: public

Parameters:

string   $fontfamily     The font family name. Possible values are: 'Times New Roman', 'Arial', 'Courier'.

[ Top ]

setHAlign   [line 649]

void setHAlign( string $location)

Set cell horizontal alignment.
  • Access: public

Parameters:

string   $location     alignment for the cell ('left', 'right', etc...).

[ Top ]

setItalic   [line 958]

void setItalic( )

Sets the font style as italic
  • Access: public

[ Top ]

setLeft   [line 787]

void setLeft( integer $style)

Sets the width for the left border of the cell
  • Access: public

Parameters:

integer   $style     style of the cell left border. 1 => thin, 2 => thick.

[ Top ]

setLeftColor   [line 868]

void setLeftColor( mixed $color)

Sets the cell's left border color
  • Access: public

Parameters:

mixed   $color     either a string (like 'blue'), or an integer (range is [8...63]).

[ Top ]

setLocked   [line 1075]

void setLocked( )

Locks a cell.
  • Access: public

[ Top ]

setMerge   [line 722]

void setMerge( )

This is an alias for the unintuitive setAlign('merge')
  • Access: public

[ Top ]

setNumFormat   [line 1023]

void setNumFormat( integer $num_format)

Sets the numeric format.

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

  • Access: public

Parameters:

integer   $num_format     The numeric format.

[ Top ]

setOutLine   [line 1043]

void setOutLine( )

Sets outlining for a font.
  • Access: public

[ Top ]

setPattern   [line 936]

void setPattern( [integer $arg = 1])

Sets the fill pattern attribute of a cell
  • Access: public

Parameters:

integer   $arg     Optional. Defaults to 1. Meaningful values are: 0-18,
  1. meaning no background.

[ Top ]

setRight   [line 798]

void setRight( integer $style)

Sets the width for the right border of the cell
  • Access: public

Parameters:

integer   $style     style of the cell right border. 1 => thin, 2 => thick.

[ Top ]

setRightColor   [line 880]

void setRightColor( mixed $color)

Sets the cell's right border color
  • Access: public

Parameters:

mixed   $color     either a string (like 'blue'), or an integer (range is [8...63]).

[ Top ]

setScript   [line 1065]

void setScript( integer $script)

Sets the script type of the text
  • Access: public

Parameters:

integer   $script     The value for script type. Possible values are:
  1. => superscript, 2 => subscript.

[ Top ]

setShadow   [line 1053]

void setShadow( )

Sets font as shadow.
  • Access: public

[ Top ]

setSize   [line 969]

void setSize( integer $size)

Sets the font size
  • Access: public

Parameters:

integer   $size     The font size (in pixels I think).

[ Top ]

setStrikeOut   [line 1033]

void setStrikeOut( )

Sets font as strikeout.
  • Access: public

[ Top ]

setTextRotation   [line 991]

void setTextRotation( integer $angle)

Sets the orientation of the text
  • Access: public

Parameters:

integer   $angle     The rotation angle for the text (clockwise). Possible

[ Top ]

setTextWrap   [line 979]

void setTextWrap( )

Sets text wrapping
  • Access: public

[ Top ]

setTop   [line 776]

void setTop( integer $style)

Sets the width for the top border of the cell
  • Access: public

Parameters:

integer   $style     style of the cell top border. 1 => thin, 2 => thick.

[ Top ]

setTopColor   [line 856]

void setTopColor( mixed $color)

Sets the cell's top border color
  • Access: public

Parameters:

mixed   $color     either a string (like 'blue'), or an integer (range is [8...63]).

[ Top ]

setUnderline   [line 948]

void setUnderline( integer $underline)

Sets the underline of the text
  • Access: public

Parameters:

integer   $underline     The value for underline. Possible values are:
  1. => underline, 2 => double underline.

[ Top ]

setUnLocked   [line 1085]

void setUnLocked( )

Unlocks a cell. Useful for unprotecting particular cells of a protected sheet.
  • Access: public

[ Top ]

setVAlign   [line 689]

void setVAlign( string $location)

Set cell vertical alignment.
  • Access: public

Parameters:

string   $location     alignment for the cell ('top', 'vleft', 'vright', etc...).

[ Top ]


Documentation generated on Tue, 26 Sep 2006 14:33:15 -0400 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.