| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565 |
- <?php
- namespace PhpOffice\PhpSpreadsheetTests\Writer\Xlsx;
- use PhpOffice\PhpSpreadsheet\Spreadsheet;
- use PhpOffice\PhpSpreadsheet\Style\Conditional;
- use PhpOffice\PhpSpreadsheet\Style\ConditionalFormatting\Wizard;
- use PhpOffice\PhpSpreadsheet\Style\Fill;
- use PhpOffice\PhpSpreadsheet\Style\Style;
- use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
- use PhpOffice\PhpSpreadsheetTests\Functional\AbstractFunctional;
- class ConditionalTest extends AbstractFunctional
- {
- /**
- * @var string
- */
- protected $cellRange;
- /**
- * @var Style
- */
- protected $style;
- protected function setUp(): void
- {
- parent::setUp();
- $this->cellRange = 'C3:E5';
- $this->style = new Style();
- $this->style->applyFromArray([
- 'fill' => [
- 'color' => ['argb' => 'FFFFC000'],
- 'fillType' => Fill::FILL_SOLID,
- ],
- ]);
- }
- public function testWriteSimpleCellConditionalFromWizard(): void
- {
- $spreadsheet = new Spreadsheet();
- $worksheet = $spreadsheet->getActiveSheet();
- $wizard = new Wizard\CellValue($this->cellRange);
- $wizard->greaterThan(5);
- $condition = $wizard->getConditional();
- $condition->setStyle($this->style);
- $worksheet->setConditionalStyles($this->cellRange, [$condition]);
- $writer = new Xlsx($spreadsheet);
- $writerWorksheet = new Xlsx\Worksheet($writer);
- $data = $writerWorksheet->writeWorksheet($worksheet, []);
- $expected = <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="cellIs" dxfId="" priority="1" operator="greaterThan"><formula>5</formula></cfRule></conditionalFormatting>
- XML;
- self::assertStringContainsString($expected, $data);
- }
- public function testWriteBetweenCellConditionalFromWizard(): void
- {
- $spreadsheet = new Spreadsheet();
- $worksheet = $spreadsheet->getActiveSheet();
- $wizard = new Wizard\CellValue($this->cellRange);
- $wizard->between(-5)->and(5);
- $condition = $wizard->getConditional();
- $condition->setStyle($this->style);
- $worksheet->setConditionalStyles($this->cellRange, [$condition]);
- $writer = new Xlsx($spreadsheet);
- $writerWorksheet = new Xlsx\Worksheet($writer);
- $data = $writerWorksheet->writeWorksheet($worksheet, []);
- $expected = <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="cellIs" dxfId="" priority="1" operator="between"><formula>-5</formula><formula>5</formula></cfRule></conditionalFormatting>
- XML;
- self::assertStringContainsString($expected, $data);
- }
- public function testWriteTextConditionalFromWizard(): void
- {
- $spreadsheet = new Spreadsheet();
- $worksheet = $spreadsheet->getActiveSheet();
- $wizard = new Wizard\TextValue($this->cellRange);
- $wizard->contains('PHP');
- $condition = $wizard->getConditional();
- $condition->setStyle($this->style);
- $worksheet->setConditionalStyles($this->cellRange, [$condition]);
- $writer = new Xlsx($spreadsheet);
- $writerWorksheet = new Xlsx\Worksheet($writer);
- $data = $writerWorksheet->writeWorksheet($worksheet, []);
- $expected = <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="containsText" dxfId="" priority="1" operator="containsText" text="PHP"><formula>NOT(ISERROR(SEARCH("PHP",C3)))</formula></cfRule></conditionalFormatting>
- XML;
- self::assertStringContainsString($expected, $data);
- }
- /**
- * @dataProvider textConditionalsProvider
- */
- public function testWriteTextConditionals(string $conditionType, string $operatorType, string $expected): void
- {
- $spreadsheet = new Spreadsheet();
- $worksheet = $spreadsheet->getActiveSheet();
- $condition = new Conditional();
- $condition->setConditionType($conditionType);
- $condition->setOperatorType($operatorType);
- $condition->setText('PHP');
- $condition->setStyle($this->style);
- $worksheet->setConditionalStyles($this->cellRange, [$condition]);
- $writer = new Xlsx($spreadsheet);
- $writerWorksheet = new Xlsx\Worksheet($writer);
- $data = $writerWorksheet->writeWorksheet($worksheet, []);
- self::assertStringContainsString($expected, $data);
- }
- public function textConditionalsProvider(): array
- {
- return [
- 'Contains' => [
- Conditional::CONDITION_CONTAINSTEXT,
- Conditional::OPERATOR_CONTAINSTEXT,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="containsText" dxfId="" priority="1" operator="containsText" text="PHP"><formula>NOT(ISERROR(SEARCH("PHP",C3)))</formula></cfRule></conditionalFormatting>
- XML
- ],
- 'Not Contains' => [
- Conditional::CONDITION_NOTCONTAINSTEXT,
- Conditional::OPERATOR_NOTCONTAINS,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="notContainsText" dxfId="" priority="1" operator="notContains" text="PHP"><formula>ISERROR(SEARCH("PHP",C3))</formula></cfRule></conditionalFormatting>
- XML
- ],
- 'Begins With' => [
- Conditional::CONDITION_BEGINSWITH,
- Conditional::OPERATOR_BEGINSWITH,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="beginsWith" dxfId="" priority="1" operator="beginsWith" text="PHP"><formula>LEFT(C3,LEN("PHP"))="PHP"</formula></cfRule></conditionalFormatting>
- XML
- ],
- 'Ends With' => [
- Conditional::CONDITION_ENDSWITH,
- Conditional::OPERATOR_ENDSWITH,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="endsWith" dxfId="" priority="1" operator="endsWith" text="PHP"><formula>RIGHT(C3,LEN("PHP"))="PHP"</formula></cfRule></conditionalFormatting>
- XML
- ],
- ];
- }
- public function testWriteDateConditionalFromWizard(): void
- {
- $spreadsheet = new Spreadsheet();
- $worksheet = $spreadsheet->getActiveSheet();
- $wizard = new Wizard\DateValue($this->cellRange);
- $wizard->today();
- $condition = $wizard->getConditional();
- $condition->setStyle($this->style);
- $worksheet->setConditionalStyles($this->cellRange, [$condition]);
- $writer = new Xlsx($spreadsheet);
- $writerWorksheet = new Xlsx\Worksheet($writer);
- $data = $writerWorksheet->writeWorksheet($worksheet, []);
- $expected = <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="timePeriod" dxfId="" priority="1" timePeriod="today"><formula>FLOOR(C3,1)=TODAY()</formula></cfRule></conditionalFormatting>
- XML;
- self::assertStringContainsString($expected, $data);
- }
- /**
- * @dataProvider dateConditionalsProvider
- */
- public function testWriteDateConditionals(string $timePeriod, string $expected): void
- {
- $spreadsheet = new Spreadsheet();
- $worksheet = $spreadsheet->getActiveSheet();
- $condition = new Conditional();
- $condition->setConditionType(Conditional::CONDITION_TIMEPERIOD);
- $condition->setOperatorType($timePeriod);
- $condition->setText($timePeriod);
- $condition->setStyle($this->style);
- $worksheet->setConditionalStyles($this->cellRange, [$condition]);
- $writer = new Xlsx($spreadsheet);
- $writerWorksheet = new Xlsx\Worksheet($writer);
- $data = $writerWorksheet->writeWorksheet($worksheet, []);
- self::assertStringContainsString($expected, $data);
- }
- public function dateConditionalsProvider(): array
- {
- return [
- 'Yesterday' => [
- Conditional::TIMEPERIOD_YESTERDAY,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="timePeriod" dxfId="" priority="1" timePeriod="yesterday"><formula>FLOOR(C3)=TODAY()-1</formula></cfRule></conditionalFormatting>
- XML
- ],
- 'Today' => [
- Conditional::TIMEPERIOD_TODAY,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="timePeriod" dxfId="" priority="1" timePeriod="today"><formula>FLOOR(C3)=TODAY()</formula></cfRule></conditionalFormatting>
- XML
- ],
- 'Tomorrow' => [
- Conditional::TIMEPERIOD_TOMORROW,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="timePeriod" dxfId="" priority="1" timePeriod="tomorrow"><formula>FLOOR(C3)=TODAY()+1</formula></cfRule></conditionalFormatting>
- XML
- ],
- 'Last 7 Days' => [
- Conditional::TIMEPERIOD_LAST_7_DAYS,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="timePeriod" dxfId="" priority="1" timePeriod="last7Days"><formula>AND(TODAY()-FLOOR(C3,1)<=6,FLOOR(C3,1)<=TODAY())</formula></cfRule></conditionalFormatting>
- XML
- ],
- 'Last Week' => [
- Conditional::TIMEPERIOD_LAST_WEEK,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="timePeriod" dxfId="" priority="1" timePeriod="lastWeek"><formula>AND(TODAY()-ROUNDDOWN(C3,0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(C3,0)<(WEEKDAY(TODAY())+7))</formula></cfRule></conditionalFormatting>
- XML
- ],
- 'This Week' => [
- Conditional::TIMEPERIOD_THIS_WEEK,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="timePeriod" dxfId="" priority="1" timePeriod="thisWeek"><formula>AND(TODAY()-ROUNDDOWN(C3,0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(C3,0)-TODAY()<=7-WEEKDAY(TODAY()))</formula></cfRule></conditionalFormatting>
- XML
- ],
- 'Next Week' => [
- Conditional::TIMEPERIOD_NEXT_WEEK,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="timePeriod" dxfId="" priority="1" timePeriod="nextWeek"><formula>AND(ROUNDDOWN(C3,0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(C3,0)-TODAY()<(15-WEEKDAY(TODAY())))</formula></cfRule></conditionalFormatting>
- XML
- ],
- 'Last Month' => [
- Conditional::TIMEPERIOD_LAST_MONTH,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="timePeriod" dxfId="" priority="1" timePeriod="lastMonth"><formula>AND(MONTH(C3)=MONTH(EDATE(TODAY(),0-1)),YEAR(C3)=YEAR(EDATE(TODAY(),0-1)))</formula></cfRule></conditionalFormatting>
- XML
- ],
- 'This Month' => [
- Conditional::TIMEPERIOD_THIS_MONTH,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="timePeriod" dxfId="" priority="1" timePeriod="thisMonth"><formula>AND(MONTH(C3)=MONTH(TODAY()),YEAR(C3)=YEAR(TODAY()))</formula></cfRule></conditionalFormatting>
- XML
- ],
- 'Next Month' => [
- Conditional::TIMEPERIOD_NEXT_MONTH,
- <<<XML
- ><conditionalFormatting sqref="C3:E5"><cfRule type="timePeriod" dxfId="" priority="1" timePeriod="nextMonth"><formula>AND(MONTH(C3)=MONTH(EDATE(TODAY(),0+1)),YEAR(C3)=YEAR(EDATE(TODAY(),0+1)))</formula></cfRule></conditionalFormatting>
- XML
- ],
- ];
- }
- public function testWriteBlankConditionalFromWizard(): void
- {
- $spreadsheet = new Spreadsheet();
- $worksheet = $spreadsheet->getActiveSheet();
- $wizard = new Wizard\Blanks($this->cellRange);
- $wizard->isBlank();
- $condition = $wizard->getConditional();
- $condition->setStyle($this->style);
- $worksheet->setConditionalStyles($this->cellRange, [$condition]);
- $writer = new Xlsx($spreadsheet);
- $writerWorksheet = new Xlsx\Worksheet($writer);
- $data = $writerWorksheet->writeWorksheet($worksheet, []);
- $expected = <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="containsBlanks" dxfId="" priority="1"><formula>LEN(TRIM(C3))=0</formula></cfRule></conditionalFormatting>
- XML;
- self::assertStringContainsString($expected, $data);
- }
- public function testWriteNonBlankConditionalFromWizard(): void
- {
- $spreadsheet = new Spreadsheet();
- $worksheet = $spreadsheet->getActiveSheet();
- $wizard = new Wizard\Blanks($this->cellRange);
- $wizard->notBlank();
- $condition = $wizard->getConditional();
- $condition->setStyle($this->style);
- $worksheet->setConditionalStyles($this->cellRange, [$condition]);
- $writer = new Xlsx($spreadsheet);
- $writerWorksheet = new Xlsx\Worksheet($writer);
- $data = $writerWorksheet->writeWorksheet($worksheet, []);
- $expected = <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="notContainsBlanks" dxfId="" priority="1"><formula>LEN(TRIM(C3))>0</formula></cfRule></conditionalFormatting>
- XML;
- self::assertStringContainsString($expected, $data);
- }
- /**
- * @dataProvider blanksConditionalsProvider
- */
- public function testWriteBlanksConditionals(string $conditionalType, string $expected): void
- {
- $spreadsheet = new Spreadsheet();
- $worksheet = $spreadsheet->getActiveSheet();
- $condition = new Conditional();
- $condition->setConditionType($conditionalType);
- $condition->setStyle($this->style);
- $worksheet->setConditionalStyles($this->cellRange, [$condition]);
- $writer = new Xlsx($spreadsheet);
- $writerWorksheet = new Xlsx\Worksheet($writer);
- $data = $writerWorksheet->writeWorksheet($worksheet, []);
- self::assertStringContainsString($expected, $data);
- }
- public function blanksConditionalsProvider(): array
- {
- return [
- 'Blanks' => [
- Conditional::CONDITION_CONTAINSBLANKS,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="containsBlanks" dxfId="" priority="1"><formula>LEN(TRIM(C3))=0</formula></cfRule></conditionalFormatting>
- XML
- ],
- 'Not Blanks' => [
- Conditional::CONDITION_NOTCONTAINSBLANKS,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="notContainsBlanks" dxfId="" priority="1"><formula>LEN(TRIM(C3))>0</formula></cfRule></conditionalFormatting>
- XML
- ],
- ];
- }
- public function testWriteNonErrorConditionalFromWizard(): void
- {
- $spreadsheet = new Spreadsheet();
- $worksheet = $spreadsheet->getActiveSheet();
- $wizard = new Wizard\Errors($this->cellRange);
- $wizard->notError();
- $condition = $wizard->getConditional();
- $condition->setStyle($this->style);
- $worksheet->setConditionalStyles($this->cellRange, [$condition]);
- $writer = new Xlsx($spreadsheet);
- $writerWorksheet = new Xlsx\Worksheet($writer);
- $data = $writerWorksheet->writeWorksheet($worksheet, []);
- $expected = <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="notContainsErrors" dxfId="" priority="1"><formula>NOT(ISERROR(C3))</formula></cfRule></conditionalFormatting>
- XML;
- self::assertStringContainsString($expected, $data);
- }
- public function testWriteErrorConditionalFromWizard(): void
- {
- $spreadsheet = new Spreadsheet();
- $worksheet = $spreadsheet->getActiveSheet();
- $wizard = new Wizard\Errors($this->cellRange);
- $wizard->isError();
- $condition = $wizard->getConditional();
- $condition->setStyle($this->style);
- $worksheet->setConditionalStyles($this->cellRange, [$condition]);
- $writer = new Xlsx($spreadsheet);
- $writerWorksheet = new Xlsx\Worksheet($writer);
- $data = $writerWorksheet->writeWorksheet($worksheet, []);
- $expected = <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="containsErrors" dxfId="" priority="1"><formula>ISERROR(C3)</formula></cfRule></conditionalFormatting>
- XML;
- self::assertStringContainsString($expected, $data);
- }
- /**
- * @dataProvider errorsConditionalsProvider
- */
- public function testWriteErrorsConditionals(string $conditionalType, string $expected): void
- {
- $spreadsheet = new Spreadsheet();
- $worksheet = $spreadsheet->getActiveSheet();
- $condition = new Conditional();
- $condition->setConditionType($conditionalType);
- $condition->setStyle($this->style);
- $worksheet->setConditionalStyles($this->cellRange, [$condition]);
- $writer = new Xlsx($spreadsheet);
- $writerWorksheet = new Xlsx\Worksheet($writer);
- $data = $writerWorksheet->writeWorksheet($worksheet, []);
- self::assertStringContainsString($expected, $data);
- }
- public function errorsConditionalsProvider(): array
- {
- return [
- 'Errors' => [
- Conditional::CONDITION_CONTAINSERRORS,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="containsErrors" dxfId="" priority="1"><formula>ISERROR(C3)</formula></cfRule></conditionalFormatting>
- XML
- ],
- 'Not Errors' => [
- Conditional::CONDITION_NOTCONTAINSERRORS,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="notContainsErrors" dxfId="" priority="1"><formula>NOT(ISERROR(C3))</formula></cfRule></conditionalFormatting>
- XML
- ],
- ];
- }
- public function testWriteUniqueConditionalFromWizard(): void
- {
- $spreadsheet = new Spreadsheet();
- $worksheet = $spreadsheet->getActiveSheet();
- $wizard = new Wizard\Duplicates($this->cellRange);
- $wizard->unique();
- $condition = $wizard->getConditional();
- $condition->setStyle($this->style);
- $worksheet->setConditionalStyles($this->cellRange, [$condition]);
- $writer = new Xlsx($spreadsheet);
- $writerWorksheet = new Xlsx\Worksheet($writer);
- $data = $writerWorksheet->writeWorksheet($worksheet, []);
- $expected = <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="uniqueValues" dxfId="" priority="1"/></conditionalFormatting>
- XML;
- self::assertStringContainsString($expected, $data);
- }
- public function testWriteDuplicateConditionalFromWizard(): void
- {
- $spreadsheet = new Spreadsheet();
- $worksheet = $spreadsheet->getActiveSheet();
- $wizard = new Wizard\Duplicates($this->cellRange);
- $wizard->duplicates();
- $condition = $wizard->getConditional();
- $condition->setStyle($this->style);
- $worksheet->setConditionalStyles($this->cellRange, [$condition]);
- $writer = new Xlsx($spreadsheet);
- $writerWorksheet = new Xlsx\Worksheet($writer);
- $data = $writerWorksheet->writeWorksheet($worksheet, []);
- $expected = <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="duplicateValues" dxfId="" priority="1"/></conditionalFormatting>
- XML;
- self::assertStringContainsString($expected, $data);
- }
- /**
- * @dataProvider duplicatesConditionalsProvider
- */
- public function testWriteDuplicatesConditionals(string $conditionalType, string $expected): void
- {
- $spreadsheet = new Spreadsheet();
- $worksheet = $spreadsheet->getActiveSheet();
- $condition = new Conditional();
- $condition->setConditionType($conditionalType);
- $condition->setStyle($this->style);
- $worksheet->setConditionalStyles($this->cellRange, [$condition]);
- $writer = new Xlsx($spreadsheet);
- $writerWorksheet = new Xlsx\Worksheet($writer);
- $data = $writerWorksheet->writeWorksheet($worksheet, []);
- self::assertStringContainsString($expected, $data);
- }
- public function duplicatesConditionalsProvider(): array
- {
- return [
- 'Duplicates' => [
- Conditional::CONDITION_DUPLICATES,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="duplicateValues" dxfId="" priority="1"/></conditionalFormatting>
- XML
- ],
- 'Unique' => [
- Conditional::CONDITION_UNIQUE,
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="uniqueValues" dxfId="" priority="1"/></conditionalFormatting>
- XML
- ],
- ];
- }
- public function testWriteExpressionConditionalFromWizard(): void
- {
- $spreadsheet = new Spreadsheet();
- $worksheet = $spreadsheet->getActiveSheet();
- $wizard = new Wizard\Expression($this->cellRange);
- $wizard->expression('=ISODD(A1)');
- $condition = $wizard->getConditional();
- $condition->setStyle($this->style);
- $worksheet->setConditionalStyles($this->cellRange, [$condition]);
- $writer = new Xlsx($spreadsheet);
- $writerWorksheet = new Xlsx\Worksheet($writer);
- $data = $writerWorksheet->writeWorksheet($worksheet, []);
- $expected = <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="expression" dxfId="" priority="1"><formula>ISODD(C3)</formula></cfRule></conditionalFormatting>
- XML;
- self::assertStringContainsString($expected, $data);
- }
- /**
- * @dataProvider expressionsConditionalsProvider
- */
- public function testWriteExpressionConditionals(string $expression, string $expected): void
- {
- $spreadsheet = new Spreadsheet();
- $worksheet = $spreadsheet->getActiveSheet();
- $condition = new Conditional();
- $condition->setConditionType(Conditional::CONDITION_EXPRESSION);
- $condition->setStyle($this->style);
- $condition->setConditions([$expression]);
- $worksheet->setConditionalStyles($this->cellRange, [$condition]);
- $writer = new Xlsx($spreadsheet);
- $writerWorksheet = new Xlsx\Worksheet($writer);
- $data = $writerWorksheet->writeWorksheet($worksheet, []);
- self::assertStringContainsString($expected, $data);
- }
- public function expressionsConditionalsProvider(): array
- {
- return [
- 'Odd' => [
- 'ISODD(C3)',
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="expression" dxfId="" priority="1"><formula>ISODD(C3)</formula></cfRule></conditionalFormatting>
- XML
- ],
- 'Even' => [
- 'ISEVEN(C3)',
- <<<XML
- <conditionalFormatting sqref="C3:E5"><cfRule type="expression" dxfId="" priority="1"><formula>ISEVEN(C3)</formula></cfRule></conditionalFormatting>
- XML
- ],
- ];
- }
- }
|