Closed themolecule closed 9 years ago
This works as numeric format (built-in):
$format = $this->workbook->addFormat();
$format->setNumFormat(2);
Your issue is regarding custom formats. Will try to figure out what's wrong.
@themolecule What version do you use? There is no version parameter in Workbook's constructor in latest version
it's just left over from the previous version... I'll take that out.
Frustrating.... Currency format appears to be decimal 65 or 66, despite documentation.
I will add descriptive constants
@themolecule I have fixed it. So it is possible to use:
use Xls\NumFormat;
$format->setNumFormat(NumberFormat::TYPE_DECIMAL_2);
//or custom format:
$format->setNumFormat('$0.00');
It is covered by tests. So please check and if it works for you.
seems to work well! Thanks!
Number formats don't seem to carry through to the xls file...
This should produce cells with currency formatting: