You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2003/03/28 06:50:58 UTC

DO NOT REPLY [Bug 18444] New: - Setting Formula in cell in POI Ver 1.8

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18444>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18444

Setting Formula in cell in  POI Ver 1.8

           Summary: Setting Formula in cell in  POI Ver 1.8
           Product: POI
           Version: unspecified
          Platform: Other
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: HSSF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: vgujjar@tcg-software.com


I tried to set formula in a cell using following three ways.

1. HSSFCell cell = sheet.createCell(1);
2. cell.setCellType(HSSFCell.CELL_TYPE_FORMULA);
3.  cell.setCellFormula("A2+B2");
Gives Error on line 2

1. HSSFCell cell = sheet.createCell(1,HSSFCell.CELL_TYPE_FORMULA);
2. cell.setCellFormula("A2+B2");
 This works but for only once i.e if I try setCellFormula again it gives a 
ClassCastException line 458 in HSSFCell.java()

1. HSSFCell cell = sheet.createCell(1);
2. cell.setCellFormula("A2+B2");
 This works perfectly