poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor LaLoggia" <Victor.LaLog...@IntraSphere.com>
Subject Displaying an integer
Date Thu, 13 Feb 2003 23:41:24 GMT
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

Mime
View raw message