froehlich 02/05/05 10:57:13 Modified: src/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements Cell.java Log: applied patch from [EMAIL PROTECTED] (Andy Oliver). Formula support for HSSF Serializer. Revision Changes Path 1.3 +7 -0 xml-cocoon2/src/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/Cell.java Index: Cell.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/Cell.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Cell.java 26 Apr 2002 14:09:22 -0000 1.2 +++ Cell.java 5 May 2002 17:57:13 -0000 1.3 @@ -111,6 +111,11 @@ void setContent(final String content) throws IOException { + if (content.charAt(0) == '=') { //seems like a kludge but this is + //actually how gnumeric does it + _cell.setCellType(HSSFCell.CELL_TYPE_FORMULA); + } + if (_cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) { try @@ -144,6 +149,8 @@ else if (_cell.getCellType() == HSSFCell.CELL_TYPE_STRING) { _cell.setCellValue(content); + } else if (_cell.getCellType() == HSSFCell.CELL_TYPE_FORMULA) { + _cell.setCellFormula(content.toUpperCase().substring(1)); } }
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]