You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Victor LaLoggia <Vi...@IntraSphere.com> on 2003/02/14 00:41:24 UTC
Displaying an integer
Hello Folks;
I am having a formatting problem with poi.
When excel displays an integer that I have written with poi it
is displayed in this format :
$12345.
Here is my offending code, where 'valueStr' is the integer value
I wish to write to excel as a String :
theCell.setCellType(HSSFCell.CELL_TYPE_NUMERIC);
cs =3D theCell.getCellStyle();
=09
cs.setDataFormat(m_dataFormatter.getFormat("#,###"));
theCell.setCellStyle(cs);
theCell.setCellValue(Integer.parseInt(valueStr));
Thanks A lot!
vic