Setting the cell type as number did not help; however setting the setCellValue(int) did help. Previously, I was using setCellValue(String).
Is this a bug in POI, i.e. once the type/value is set during generation of the report, users cannot reformat the cell by opening the file in Excel. -Vishal -----Original Message----- From: Avik Sengupta [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:09 PM To: POI Users List Subject: Re: Unable to apply formula SUM set your cell type as a number! -------Original Message------- > From: Mehra, Vishal <[EMAIL PROTECTED]> > Subject: Unable to apply formula SUM > Sent: 14 Aug 2003 03:06:06 > > Created Excel worksheet using POI. All the cell values are formatted as string. > > ����������cell = currentRow.createCell( (short) i); > ����������cell.setCellType(HSSFCell.CELL_TYPE_STRING); > ����������cell.setCellValue(columnValue); > > I am unable to apply SUM (or AutoSum) formula on the numeric values. After opening the Excel file, > I even tried to format all the cells as numeric/accouting,.... but with no success. > > SUM is always coming as zero... > > Any pointers... > > Thanks, > > Vishal > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -------Original Message------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
