mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-10-08 04:46:26 +00:00
Resolution for [#Issue 1972](https://github.com/PHPOffice/PhpSpreadsheet/issues/1972) (#1978)
* Resolution for [#Issue 1972](https://github.com/PHPOffice/PhpSpreadsheet/issues/1972) where format masks with a leading and trailing quote were always treated as literal strings, even when they masks containing quoted characters. Also resolves issue with colour name case-sensitivity
This commit is contained in:
@@ -390,6 +390,11 @@ return [
|
||||
12345,
|
||||
'[Green]General',
|
||||
],
|
||||
[
|
||||
'12345',
|
||||
12345,
|
||||
'[GrEeN]General',
|
||||
],
|
||||
[
|
||||
'-70',
|
||||
-70,
|
||||
@@ -404,14 +409,24 @@ return [
|
||||
[
|
||||
'12345',
|
||||
12345,
|
||||
'[Blue]0;[Red]0',
|
||||
'[Blue]0;[Red]0-',
|
||||
],
|
||||
[
|
||||
'12345-',
|
||||
-12345,
|
||||
'[BLUE]0;[red]0-',
|
||||
],
|
||||
[
|
||||
'12345-',
|
||||
-12345,
|
||||
'[blue]0;[RED]0-',
|
||||
],
|
||||
// Multiple colors with text substitution
|
||||
[
|
||||
'Positive',
|
||||
12,
|
||||
'[Green]"Positive";[Red]"Negative";[Blue]"Zero"',
|
||||
],
|
||||
// Multiple colors with text substitution
|
||||
[
|
||||
'Zero',
|
||||
0,
|
||||
@@ -422,6 +437,7 @@ return [
|
||||
-2,
|
||||
'[Green]"Positive";[Red]"Negative";[Blue]"Zero"',
|
||||
],
|
||||
// Value break points
|
||||
[
|
||||
'<=3500 red',
|
||||
3500,
|
||||
@@ -442,6 +458,17 @@ return [
|
||||
25,
|
||||
'[Green][<>25]"<>25 green";[Red]"else red"',
|
||||
],
|
||||
// Leading/trailing quotes in mask
|
||||
[
|
||||
'$12.34 ',
|
||||
12.34,
|
||||
'$#,##0.00_;[RED]"($"#,##0.00")"',
|
||||
],
|
||||
[
|
||||
'($12.34)',
|
||||
-12.34,
|
||||
'$#,##0.00_;[RED]"($"#,##0.00")"',
|
||||
],
|
||||
[
|
||||
'pfx. 25.00',
|
||||
25,
|
||||
|
||||
Reference in New Issue
Block a user