mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-22 08:09:15 +00:00
Improved handling for ? placeholder in Number Format Masks
This commit is contained in:
@@ -364,7 +364,7 @@ return [
|
||||
'_-€* #,##0.00_-;"-€"* #,##0.00_-;_-€* -??_-;_-@_-',
|
||||
],
|
||||
[
|
||||
' € - ',
|
||||
' € - ',
|
||||
0,
|
||||
'_-€* #,##0.00_-;"-€"* #,##0.00_-;_-€* -??_-;_-@_-',
|
||||
],
|
||||
@@ -1326,7 +1326,7 @@ return [
|
||||
NumberFormat::FORMAT_CURRENCY_EUR_INTEGER,
|
||||
],
|
||||
[
|
||||
' $ - ',
|
||||
' $ - ',
|
||||
'0',
|
||||
NumberFormat::FORMAT_ACCOUNTING_USD,
|
||||
],
|
||||
@@ -1356,7 +1356,7 @@ return [
|
||||
NumberFormat::FORMAT_ACCOUNTING_USD,
|
||||
],
|
||||
[
|
||||
' $ - ',
|
||||
' $ - ',
|
||||
'-0',
|
||||
NumberFormat::FORMAT_ACCOUNTING_USD,
|
||||
],
|
||||
@@ -1386,7 +1386,7 @@ return [
|
||||
NumberFormat::FORMAT_ACCOUNTING_USD,
|
||||
],
|
||||
[
|
||||
' € - ',
|
||||
' € - ',
|
||||
'0',
|
||||
NumberFormat::FORMAT_ACCOUNTING_EUR,
|
||||
],
|
||||
@@ -1416,7 +1416,7 @@ return [
|
||||
NumberFormat::FORMAT_ACCOUNTING_EUR,
|
||||
],
|
||||
[
|
||||
' € - ',
|
||||
' € - ',
|
||||
'-0',
|
||||
NumberFormat::FORMAT_ACCOUNTING_EUR,
|
||||
],
|
||||
@@ -1550,4 +1550,76 @@ return [
|
||||
1025132.36,
|
||||
'#,###,.##',
|
||||
],
|
||||
[
|
||||
'.05',
|
||||
50,
|
||||
'#.00,',
|
||||
],
|
||||
[
|
||||
'50.05',
|
||||
50050,
|
||||
'#.00,',
|
||||
],
|
||||
[
|
||||
'555.50',
|
||||
555500,
|
||||
'#.00,',
|
||||
],
|
||||
[
|
||||
'.56',
|
||||
555500,
|
||||
'#.00,,',
|
||||
],
|
||||
// decimal placement
|
||||
[
|
||||
' 44.398',
|
||||
44.398,
|
||||
'???.???',
|
||||
],
|
||||
[
|
||||
'102.65 ',
|
||||
102.65,
|
||||
'???.???',
|
||||
],
|
||||
[
|
||||
' 2.8 ',
|
||||
2.8,
|
||||
'???.???',
|
||||
],
|
||||
[
|
||||
' 3',
|
||||
2.8,
|
||||
'???',
|
||||
],
|
||||
[
|
||||
'12,345',
|
||||
12345,
|
||||
'?,???',
|
||||
],
|
||||
[
|
||||
'123',
|
||||
123,
|
||||
'?,???',
|
||||
],
|
||||
[
|
||||
'$.50',
|
||||
0.5,
|
||||
'$?.00',
|
||||
],
|
||||
[
|
||||
'Part Cost $.50',
|
||||
0.5,
|
||||
'Part Cost $?.00',
|
||||
],
|
||||
// Empty Section
|
||||
[
|
||||
'',
|
||||
-12345.6789,
|
||||
'#,##0.00;',
|
||||
],
|
||||
[
|
||||
'',
|
||||
-12345.6789,
|
||||
'#,##0.00;;"---"',
|
||||
],
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user