W
W
wotmc2018-09-26 09:59:09
PHP
wotmc, 2018-09-26 09:59:09

Conditional range formatting in PHPSpreadSheet by median - how to implement?

If you unpick xlsx, then the conditional formatting of the range by median looks like this:

<conditionalFormatting sqref="C6:E6 G6:I6">
        <cfRule type="colorScale" priority="72">
            <colorScale>
                <cfvo type="min"/>
                <cfvo type="percentile" val="50"/>
                <cfvo type="max"/>
                <color rgb="FFF8696B"/>
                <color rgb="FFFFEB84"/>
                <color rgb="FF63BE7B"/>
            </colorScale>
        </cfRule>
    </conditionalFormatting>

Such formatting must be specified in a sheet created from scratch.
In the documentation and source codes (Constants of the Conditional class) I did not find a similar type of formatting.
Is there such a feature in PHPSpreadSheet and in which direction to dig if it is not?
Append XML line by line?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question