You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2020/12/31 11:00:44 UTC

[incubator-hop] branch master updated: HOP-2358 - ExcelInput going back to version 3.17 of POI

This is an automated email from the ASF dual-hosted git repository.

hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hop.git


The following commit(s) were added to refs/heads/master by this push:
     new dba85f3  HOP-2358 - ExcelInput going back to version 3.17 of POI
     new 8765f82  Merge pull request #512 from nadment/HOP-2358
dba85f3 is described below

commit dba85f303a1796f42dbba76337cef75ae8bf0c21
Author: nadment <na...@gmail.com>
AuthorDate: Wed Dec 30 16:32:48 2020 +0100

    HOP-2358 - ExcelInput going back to version 3.17 of POI
---
 plugins/transforms/excelinput/pom.xml                            | 2 +-
 .../apache/hop/pipeline/transforms/excelinput/poi/PoiCell.java   | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/plugins/transforms/excelinput/pom.xml b/plugins/transforms/excelinput/pom.xml
index 14e4378..64ff967 100644
--- a/plugins/transforms/excelinput/pom.xml
+++ b/plugins/transforms/excelinput/pom.xml
@@ -35,7 +35,7 @@
 
     <properties>       
         <odfdom-java.version>0.8.7</odfdom-java.version>
-        <poi.version>4.1.2</poi.version>
+        <poi.version>3.17</poi.version>
         <xerces.version>2.12.0</xerces.version>
         <xmlbeans.version>3.1.0</xmlbeans.version>
     </properties>
diff --git a/plugins/transforms/excelinput/src/main/java/org/apache/hop/pipeline/transforms/excelinput/poi/PoiCell.java b/plugins/transforms/excelinput/src/main/java/org/apache/hop/pipeline/transforms/excelinput/poi/PoiCell.java
index 4d9210d..141644b 100644
--- a/plugins/transforms/excelinput/src/main/java/org/apache/hop/pipeline/transforms/excelinput/poi/PoiCell.java
+++ b/plugins/transforms/excelinput/src/main/java/org/apache/hop/pipeline/transforms/excelinput/poi/PoiCell.java
@@ -40,7 +40,10 @@ public class PoiCell implements IKCell {
   }
 
   public KCellType getType() {
-    switch ( cell.getCellType() ) {
+    // For POI version 4.1.2
+    // switch ( cell.getCellType() ) {
+      
+    switch ( cell.getCellTypeEnum() ) {
       case BOOLEAN:
         return KCellType.BOOLEAN;
         
@@ -58,7 +61,9 @@ public class PoiCell implements IKCell {
         return KCellType.EMPTY;
       
       case FORMULA: 
-        switch ( cell.getCachedFormulaResultType() ) {
+       // For POI version 4.1.2
+       // switch ( cell.getCachedFormulaResultType() ) {
+        switch ( cell.getCachedFormulaResultTypeEnum() ) {
           case BLANK:
           case ERROR:
             return KCellType.EMPTY;