Summary: | Setting Formula in cell in POI Ver 1.8 | ||
---|---|---|---|
Product: | POI | Reporter: | Vikranth <vgujjar> |
Component: | HSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | All |
Description
Vikranth
2003-03-28 05:50:57 UTC
I am not developer:D,but I have an opinion about the problem. When I tried to call HSSFCell#setCellType(CELL_TYPE_STRING) to a cell having a "number value" and I fouund it causes Exception.It is reasonable because number value is already existed. HSSFCell has some metod to set value,setCellFormula(formulla string) and setCellValue(for each value types).and in thease methods,inner logic automatically changes cell's type to right value. So I feel,the method HSSFCell#setCellType() is no need to open as public method. The matter that the method is pubic, may make users confuse(as I did:D).The method should be "deprecated method". I went throught the source code I find that setCellFormula(String formula) calls the setCellType(HSSFCell.CELL_TYPE_FORMULA) so, you are right because this method setCellType(HSSFCell.CELL_TYPE_FORMULA) is being called twice hence throws exception. Thanks for your reply.. this looks like a conversation that should have been on the list and has resolved itself. |