0

I want to convert a number in a USD format. What I tried is

$xl = $objPHPExcel->getActiveSheet();
$xl->getStyle("$col$row")->getNumberFormat()->setFormatCode('$0.00');

But in the export, the value is displayed as #### for large numbers. Ex. if the amount is 11121 then in the export it is displaying as $11121.00 which is expected, but for the number 155555 it is displaying as ####### in the export output. I have an idea about PHPExcel_Cell_DataType::TYPE_STRING. But I want the currency in USD format and at the end of the file, I am generating the sum of all rows (sum of all price).

I also triedPHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD but no luck.

Curious
  • 93
  • 1
  • 11

0 Answers0