Running into a funny field we're reading in.

In Excel, you can create one by putting say "4.79" in a cell, then format
it with accounting, then go into the options and select "None" for the
symbol.

My HSSF code prints "$4.79", and my XSSF code prints "* 4.79"

I would expect this to print the simple "4.79"  Thoughts on howto chase
this bug down?

When I unzip the XLSX file and dig into the worksheet XML I see:
<c r="L2" s="7"><v>4.79</v></c>
<c r="M2" s="6"><v>4.79</v></c>

<c r="L3" s="7"><v>5.79</v></c>
<c r="M3" s="6"><v>5.79</v></c>

The L2/L3 I believe is the Accounting w/format of No Symbol, and the M2 is
Accounting w/the $ as a symbol

Style ID 7 refers to:
    <xf numFmtId="43" fontId="0" fillId="0" borderId="0" xfId="0"
applyNumberFormat="1"/>
Style ID 6 refers to:
    <xf numFmtId="44" fontId="0" fillId="0" borderId="0" xfId="0"
applyNumberFormat="1"/>


43 in hex => 0x2B, 44 in hex => 0x2C
http://www.docjar.com/docs/api/org/apache/poi/ss/usermodel/BuiltinFormats.html

0x2b, "_(*#,##0.00_);_(*(#,##0.00);_(*\"-\"??_);_(@_)"
0x2c, "_($*#,##0.00_);_($*(#,##0.00);_($*\"-\"??_);_(@_)"

So that's where the asterix comes in, but why is there an asterix?

Regards,

Eric

Reply via email to