You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Chris Warr <Ch...@esd.nec.com.au> on 2004/09/13 07:22:47 UTC
Numeric cells with commas
Hi, I'm trying to add a cell with type=HSSFCell.CELL_TYPE_NUMERIC. I have a
string like '1,234.56'. I want the string to end up with the comma in the
spreadsheet but I want the cell to be numeric. Is this possible? Excel
lets me type it in.
Chris.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
RE: Numeric cells with commas
Posted by bhavik <bh...@webdev.co.zw>.
Hi,
Try setting the cell format to "#,##0.00", don't set the
type=HSSFCell.CELL_TYPE_NUMERIC. And then simply set your value. It
should automatically display as you want it.
Bhavik Merchant
Webdev (Pvt.) Limited
Physical Address: Cnr 9th St & Josiah Tongogara
Website: http://www.webdev.co.zw
Phone: +263 (0)4 702906
Cell: +263 (0)91372788
-----Original Message-----
From: Chris Warr [mailto:ChrisW@esd.nec.com.au]
Sent: Monday, September 13, 2004 7:23 AM
To: poi-user@jakarta.apache.org
Subject: Numeric cells with commas
Hi, I'm trying to add a cell with type=HSSFCell.CELL_TYPE_NUMERIC. I
have a
string like '1,234.56'. I want the string to end up with the comma in
the
spreadsheet but I want the cell to be numeric. Is this possible? Excel
lets me type it in.
Chris.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org