Extension version 1.6.0 or later;
1.6.0
Build with --enable-reader;
--enable-reader
Returns every <conditionalFormatting> block defined on the active worksheet, with the rules inside each block.
<conditionalFormatting>
getConditionalFormats(): ?array
An array of regions:
range (string) — applied range, e.g. A1:A10;
range
A1:A10
rules (array) — list of rules; each rule has:
rules
type (string) — rule type, e.g. cellIs, expression, top10, containsText;
type
cellIs
expression
top10
containsText
operator (string|null) — comparison operator, e.g. between, greaterThan;
operator
between
greaterThan
priority (int) — rule priority;
priority
stop_if_true (bool) — stop processing further rules when this one matches;
stop_if_true
dxf_id (int|null) — index into the differential format table;
dxf_id
percent (bool) — top10: rank by percent;
percent
bottom (bool) — top10: bottom N instead of top N;
bottom
rank (int|null) — top10: N value;
rank
text (string|null) — text used by text rules;
text
time_period (string|null) — time-period rule keyword;
time_period
formula1 (string|null) — first formula;
formula1
formula2 (string|null) — second formula.
formula2
Last updated 18 days ago
$config = ['path' => './tests']; $excel = new \Vtiful\Kernel\Excel($config); $cfs = $excel->openFile('source.xlsx') ->openSheet() ->getConditionalFormats(); var_export($cfs);