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 2010/03/05 07:06:15 UTC

DO NOT REPLY [Bug 48494] EventBasedExcelExtractor and ExcelExtractor don't process conditional cell formatting correctly

https://issues.apache.org/bugzilla/show_bug.cgi?id=48494

--- Comment #2 from Phil Varner <ph...@gmail.com> 2010-03-05 06:06:13 UTC ---
Patch (the revision commit numbers may need removing/changing, this was to a
private svn repo):

Index: src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java
===================================================================
--- src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java       
(revision 99199)
+++ src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java       
(revision 99174)
@@ -275,15 +275,8 @@
                        }

                        // Format as a number
-                       // some format strings contain unescaped ;s which cause
-                       // problems.  Since this is only for indexing, we
-                       // can ignore these and just return the unformatted
string (hacky?)
-                       try {
-                               DecimalFormat df = new
DecimalFormat(formatString);
-                               return df.format(value);
-                       } catch (java.lang.IllegalArgumentException e){
-                               return String.valueOf(value);
-                       }
+                       DecimalFormat df = new DecimalFormat(formatString);
+                       return df.format(value);
                }
        }
 }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org