Class \avadim\FastExcelWriter\Style\Style
On this page
- setAlignLeft()
- Parameters
- setAlignRight()
- Parameters
- setBgColor()
- Parameters
- setBorder()
- Parameters
- setBorderBottom()
- Parameters
- setBorderLeft()
- Parameters
- setBorderRight()
- Parameters
- setBorderTop()
- Parameters
- setColor()
- Parameters
- setFillColor()
- Parameters
- setFillGradient()
- Parameters
- setFont()
- Parameters
- setFontColor()
- Parameters
- setFontName()
- Parameters
- setFontSize()
- Parameters
- setFontStyle()
- Parameters
- setFontStyleBold()
- Parameters
- setFontStyleItalic()
- Parameters
- setFontStyleStrikethrough()
- Parameters
- setFontStyleUnderline()
- Parameters
- setFormat()
- Parameters
- setIndentDistributed()
- Parameters
- setIndentLeft()
- Parameters
- setIndentRight()
- Parameters
- setTextAlign()
- Parameters
- setTextCenter()
- Parameters
- setTextColor()
- Parameters
- setTextRotation()
- Parameters
- setTextWrap()
- Parameters
- setVerticalAlign()
- Parameters
- toArray()
- Parameters
- setAlignLeft() – Apply left alignment to content
- setAlignRight() – Apply right alignment to content
- setBgColor() – Alias of 'setFillColor()'
- setBorder() – Sets all borders style
- setBorderBottom() – Styles and color for bottom border
- setBorderLeft() – Styles and color for left border
- setBorderRight() – Styles and color for right border
- setBorderTop() – Styles and color for top border
- setColor() – Alias of 'setFontColor()'
- setFillColor() – Fill background color
- setFillGradient() – Fill background by gradient
- setFont() – Font name, size, style and color
- setFontColor() – Font color
- setFontName() – Font name
- setFontSize() – Font size
- setFontStyle() – Font style
- setFontStyleBold() – Bold font
- setFontStyleItalic() – Italic font
- setFontStyleStrikethrough() – Sets strikethrough
- setFontStyleUnderline() – Sets underline
- setFormat() – Sets format
- setIndentDistributed() – Indent distributed
- setIndentLeft() – Indent left
- setIndentRight() – Indent right
- setTextAlign() – Horizontal and vertical content align
- setTextCenter() – Center content by horizontal and vertical
- setTextColor() – Another alias of 'setFontColor()'
- setTextRotation() – Text rotation
- setTextWrap() – Text wrap option
- setVerticalAlign() – Vertical content align
- toArray() – Return style properties as array
setAlignLeft()
public function setAlignLeft(): Style
Apply left alignment to content
Parameters
None
setAlignRight()
public function setAlignRight(): Style
Apply right alignment to content
Parameters
None
setBgColor()
public function setBgColor(string $color, ?string $pattern = null): Style
Alias of 'setFillColor()'
Parameters
string $colorstring|null $pattern
setBorder()
public function setBorder(string $style, ?string $color = '#000000'): Style
Sets all borders style
Parameters
string $stylestring|null $color
setBorderBottom()
public function setBorderBottom(string $style,
?string $color = '#000000'): Style
Styles and color for bottom border
Parameters
string $stylestring|null $color
setBorderLeft()
public function setBorderLeft(string $style,
?string $color = '#000000'): Style
Styles and color for left border
Parameters
string $stylestring|null $color
setBorderRight()
public function setBorderRight(string $style,
?string $color = '#000000'): Style
Styles and color for right border
Parameters
string $stylestring|null $color
setBorderTop()
public function setBorderTop(string $style, ?string $color = '#000000'): Style
Styles and color for top border
Parameters
string $stylestring|null $color
setColor()
public function setColor(string $color): Style
Alias of 'setFontColor()'
Parameters
string $color
setFillColor()
public function setFillColor(string $color, ?string $pattern = null): Style
Fill background color
Parameters
string $colorstring|null $pattern
setFillGradient()
public function setFillGradient(string $color1, string $color2,
?int $degree = null): Style
Fill background by gradient
Parameters
string $color1string $color2int|null $degree
setFont()
public function setFont(string $fontName, ?int $fontSize = null,
?string $fontStyle = null,
?string $fontColor = null): Style
Font name, size, style and color
Parameters
string $fontNameint|null $fontSizestring|null $fontStylestring|null $fontColor
setFontColor()
public function setFontColor(string $color): Style
Font color
Parameters
string $color
setFontName()
public function setFontName(string $fontName): Style
Font name
Parameters
string $fontName
setFontSize()
public function setFontSize(float $fontSize): Style
Font size
Parameters
float $fontSize
setFontStyle()
public function setFontStyle(string $fontStyle): Style
Font style
Parameters
string $fontStyle
setFontStyleBold()
public function setFontStyleBold(): Style
Bold font
Parameters
None
setFontStyleItalic()
public function setFontStyleItalic(): Style
Italic font
Parameters
None
setFontStyleStrikethrough()
public function setFontStyleStrikethrough(): Style
Sets strikethrough
Parameters
None
setFontStyleUnderline()
public function setFontStyleUnderline(?bool $double = false): Style
Sets underline
Parameters
bool|null $double
setFormat()
public function setFormat($format): Style
Sets format
Parameters
string|array $format
setIndentDistributed()
public function setIndentDistributed(int $indent): Style
Indent distributed
Parameters
int $indent
setIndentLeft()
public function setIndentLeft(int $indent): Style
Indent left
Parameters
int $indent
setIndentRight()
public function setIndentRight(int $indent): Style
Indent right
Parameters
int $indent
setTextAlign()
public function setTextAlign(string $textAlign,
?string $verticalAlign = null): Style
Horizontal and vertical content align
Parameters
string $textAlignstring|null $verticalAlign
setTextCenter()
public function setTextCenter(): Style
Center content by horizontal and vertical
Parameters
None
setTextColor()
public function setTextColor(string $color): Style
Another alias of 'setFontColor()'
Parameters
string $color
setTextRotation()
public function setTextRotation(int $degrees): Style
Text rotation
Parameters
int $degrees
setTextWrap()
public function setTextWrap(?bool $textWrap = true): Style
Text wrap option
Parameters
bool|null $textWrap
setVerticalAlign()
public function setVerticalAlign(string $verticalAlign): Style
Vertical content align
Parameters
string $verticalAlign
toArray()
public function toArray(): array
Return style properties as array
Parameters
None