I have the following code
$xl = new PHPExcel();
$sheet = xl->setActiveSheetIndex(0)
$sheet->getStyle('A')->getNumberFormat()->setFormatCode('#,##0.00');
$format = $sheet->getStyle('A')->getNumberFormat()->getFormatCode();
I'd expect $format to contain #,##0.00
but it contains General
.
Am I missing something?
PHPExcel v. 1.7.6
PHPExcel does not support row or column styles: styles are applied to cells
$sheet->getStyle('A1')->getNumberFormat()->setFormatCode('#,##0.00');
or to ranges of cells
$sheet->getStyle('A1:B2')->getNumberFormat()->setFormatCode('#,##0.00');
and version 1.7.6 is very dated now, you really should upgrade to a more recent version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With