php - How to have Number format to display '$' as well as decimals of 4 places in phpexcel -
$this->excel->getactivesheet()->getstyle('a1')->getnumberformat()->setformatcode('0.0000'); $this->excel->getactivesheet()->getstyle('a1')->getnumberformat()->setformatcode(phpexcel_style_numberformat::format_currency_usd_simple);
if try code code display '$' in cell work not decimal one, if reverse code display 4 decimal points work not code display '$'.
i trying write excel file using phpexcel library
number format codes strings, don't have use built-in values; can set them valid ms excel number format mask
e.g
$this->excel->getactivesheet()->getstyle('a1') ->getnumberformat() ->setformatcode('$ #,##0.0000');
you can clever them
$this->excel->getactivesheet()->getstyle('a1') ->getnumberformat() ->setformatcode('$ #,##0.0000;[red]-$ #,##0.0000');
Comments
Post a Comment