Class \avadim\FastExcelWriter\Conditional\Conditional
On this page
- __construct()
- Parameters
- aboveAverage()
- Parameters
- beginsWith()
- Parameters
- belowAverage()
- Parameters
- between()
- Parameters
- colorScale()
- Parameters
- colorScaleMax()
- Parameters
- colorScaleMin()
- Parameters
- colorScaleNum()
- Parameters
- contains()
- Parameters
- dataBar()
- Parameters
- duplicateValues()
- Parameters
- endsWith()
- Parameters
- equals()
- Parameters
- expression()
- Parameters
- greaterThan()
- Parameters
- greaterThanOrEqual()
- Parameters
- isEmpty()
- Parameters
- lessThan()
- Parameters
- lessThanOrEqual()
- Parameters
- low()
- Parameters
- lowPercent()
- Parameters
- make()
- Parameters
- notBetween()
- Parameters
- notContains()
- Parameters
- notEquals()
- Parameters
- top()
- Parameters
- topPercent()
- Parameters
- uniqueValues()
- Parameters
- getStyle()
- Parameters
- setDirectionRtl()
- Parameters
- setDxfId()
- Parameters
- setFillColor()
- Parameters
- setFontColor()
- Parameters
- setGradient()
- Parameters
- setShowValue()
- Parameters
- setStyle()
- Parameters
- __construct() – Create a new Conditional
- aboveAverage()
- beginsWith() – Applies a style if the cell value starts with the specified text
- belowAverage()
- between() – The cell value is between two given values
- colorScale()
- colorScaleMax()
- colorScaleMin()
- colorScaleNum()
- contains() – Applies a style if the cell value contains the specified text.
- dataBar() – Colored data bar inside a cell
- duplicateValues()
- endsWith() – Applies a style if the cell value ends with the specified text
- equals() – The cell value is equal to the given value
- expression() – Applies the style if the expression evaluates to TRUE
- greaterThan() – The cell value is greater than the specified value
- greaterThanOrEqual() – The cell value is greater than or equal to the specified value
- isEmpty() – Applies a style if the cell is empty
- lessThan() – The cell value is less than the specified value
- lessThanOrEqual() – The cell value is less than or equal to the specified value
- low()
- lowPercent()
- make() – Cell value is compared to a specified value or formula
- notBetween() – The cell value is between two given values
- notContains() – Applies a style if the cell value does not contain the specified text.
- notEquals() – The cell value is not equal to the specified value
- top()
- topPercent()
- uniqueValues()
- getStyle()
- setDirectionRtl() – Determines the direction of the bars
- setDxfId()
- setFillColor()
- setFontColor()
- setGradient() – Enables or disables the gradient style of the bars
- setShowValue() – Controls the display of the value in a cell
- setStyle()
__construct()
public function __construct(string $type, string $operator, $options, $style)
Create a new Conditional
Parameters
$type$operator$options$style
aboveAverage()
public static function aboveAverage(array $style): Conditional
Parameters
array $style
beginsWith()
public static function beginsWith(string $text,
?array $style = null): Conditional
Applies a style if the cell value starts with the specified text
Parameters
string $textarray|null $style
belowAverage()
public static function belowAverage(array $style): Conditional
Parameters
array $style
between()
public static function between(array $values,
?array $style = null): Conditional
The cell value is between two given values
Parameters
int[]|float[] $valuesarray|null $style
colorScale()
public static function colorScale(string $color1, string $color2,
?string $color3 = null): Conditional
Parameters
string $color1string $color2string|null $color3
colorScaleMax()
public static function colorScaleMax(string $color): Conditional
Parameters
string $color
colorScaleMin()
public static function colorScaleMin(string $color): Conditional
Parameters
string $color
colorScaleNum()
public static function colorScaleNum(array $values, string $color1,
string $color2,
?string $color3 = null): Conditional
Parameters
array $valuesstring $color1string $color2string|null $color3
contains()
public static function contains(string $text,
?array $style = null): Conditional
Applies a style if the cell value contains the specified text.
Parameters
string $textarray|null $style
dataBar()
public static function dataBar(string $color): Conditional
Colored data bar inside a cell
Parameters
string $color
duplicateValues()
public static function duplicateValues(array $style): Conditional
Parameters
array $style
endsWith()
public static function endsWith(string $text,
?array $style = null): Conditional
Applies a style if the cell value ends with the specified text
Parameters
string $textarray|null $style
equals()
public static function equals($value, ?array $style = null): Conditional
The cell value is equal to the given value
Parameters
int|float|string $valuearray|null $style
expression()
public static function expression(string $formula,
?array $style = null): Conditional
Applies the style if the expression evaluates to TRUE
Parameters
string $formulaarray|null $style
greaterThan()
public static function greaterThan($value, ?array $style = null): Conditional
The cell value is greater than the specified value
Parameters
int|float|string $valuearray|null $style
greaterThanOrEqual()
public static function greaterThanOrEqual($value,
?array $style = null): Conditional
The cell value is greater than or equal to the specified value
Parameters
int|float|string $valuearray|null $style
isEmpty()
public static function isEmpty(?string $cell = null,
?array $style = null): Conditional
Applies a style if the cell is empty
Parameters
string|null $cellarray|null $style
lessThan()
public static function lessThan($value, ?array $style = null): Conditional
The cell value is less than the specified value
Parameters
int|float|string $valuearray|null $style
lessThanOrEqual()
public static function lessThanOrEqual($value,
?array $style = null): Conditional
The cell value is less than or equal to the specified value
Parameters
int|float|string $valuearray|null $style
low()
public static function low(int $rank, array $style): Conditional
Parameters
int $rankarray $style
lowPercent()
public static function lowPercent(int $rank, array $style): Conditional
Parameters
int $rankarray $style
make()
public static function make(string $operator, $formula,
?array $style = null): Conditional
Cell value is compared to a specified value or formula
Parameters
string $operatorint|float|string|array $formulaarray|null $style
notBetween()
public static function notBetween(array $values,
?array $style = null): Conditional
The cell value is between two given values
Parameters
int[]|float[] $valuesarray|null $style
notContains()
public static function notContains(string $text,
?array $style = null): Conditional
Applies a style if the cell value does not contain the specified text.
Parameters
string $textarray|null $style
notEquals()
public static function notEquals($value, ?array $style = null): Conditional
The cell value is not equal to the specified value
Parameters
int|float|string $valuearray|null $style
top()
public static function top(int $rank, array $style): Conditional
Parameters
int $rankarray $style
topPercent()
public static function topPercent(int $rank, array $style): Conditional
Parameters
int $rankarray $style
uniqueValues()
public static function uniqueValues(array $style): Conditional
Parameters
array $style
getStyle()
public function getStyle(): ?array
Parameters
None
setDirectionRtl()
public function setDirectionRtl(bool $value): Conditional
Determines the direction of the bars
Parameters
bool $value
setDxfId()
public function setDxfId(int $dxfId): Conditional
Parameters
int $dxfId
setFillColor()
public function setFillColor($color): Conditional
Parameters
$color
setFontColor()
public function setFontColor($color): Conditional
Parameters
$color
setGradient()
public function setGradient(bool $value): Conditional
Enables or disables the gradient style of the bars
Parameters
bool $value
setShowValue()
public function setShowValue(bool $value): Conditional
Controls the display of the value in a cell
Parameters
bool $value
setStyle()
public function setStyle($style): Conditional
Parameters
string|array $style