apache poi - POI default formats Issue -
i noticed when spreadsheet created using poi, default style set comma style, set when opening in excel , clicking button comma style, in office 2007 onward, results in format includes currency symbol (contrary definition of comma style in excel).
this occurs without format changing code in source, seems built poi , effect worksheet-wide.
by creating such file , setting cell comma style excel , doing cell format (right click etc.), appears custom format, of form
_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)
in normal excel file, expected format have been accounting without currency symbol.
is there way change default styles within poi in order correct behavior comma style?
i testing npoi 1.2.5, net framework port, suppose full equivalent of apache poi form derived.
with difficulty found reason , answering reference.
i using latest stable release of npoi. 1.2.5.
checking source(in file builtinformats.cs), standard formats defined, found following
putformat(m, 0x2b, "_(\"$\"* #,##0.00_);_(\"$\"* (#,##0.00);_(\"$\"* \"-\"??_);_(@_)"); putformat(m, 0x2c, "_(* #,##0.00_);_(* (#,##0.00);_(* \"-\"??_);_(@_)");
in http://support.microsoft.com/kb/147942, includes list of standard formats, 2 entries in question are
0x2b _(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_) 0x2c _($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)
this reversal in npoi source seems causing invalid behavior of comma style.
Comments
Post a Comment