Skip to content
Permalink
Browse files

poi upgrade

  • Loading branch information...
teodord committed Apr 18, 2017
1 parent ca5976e commit b7bd874137d357e0c27e04d1595086826c38995b
@@ -4,7 +4,7 @@
</info>
<dependencies>
<dependency org="dom4j" name="dom4j" rev="1.6.1" conf="test->*"/>
<dependency org="org.apache.poi" name="poi-ooxml-schemas" rev="3.14" conf="test->*"/>
<dependency org="org.apache.poi" name="poi-ooxml-schemas" rev="3.15" conf="test->*"/>
<dependency org="org.apache.xmlbeans" name="xmlbeans" rev="2.6.0" conf="test->*"/>
<dependency org="commons-lang" name="commons-lang" rev="2.6" conf="test->*"/>
</dependencies>
@@ -14,8 +14,9 @@
<dependency org="commons-digester" name="commons-digester" rev="2.1" conf="test->*"/>
<dependency org="commons-lang" name="commons-lang" rev="2.6" conf="test->*"/>
<dependency org="commons-logging" name="commons-logging" rev="1.1.1" conf="test->*"/>
<dependency org="org.apache.poi" name="poi-ooxml" rev="3.14" conf="test->*"/>
<dependency org="org.apache.poi" name="poi" rev="3.14" conf="test->*"/>
<dependency org="org.apache.commons" name="commons-collections4" rev="4.1" conf="test->*"/>
<dependency org="org.apache.poi" name="poi-ooxml" rev="3.15" conf="test->*"/>
<dependency org="org.apache.poi" name="poi" rev="3.15" conf="test->*"/>
<dependency org="org.apache.velocity" name="velocity" rev="1.7" conf="test->*"/>
<dependency org="org.codehaus.castor" name="castor-core" rev="1.3.3" conf="test->*"/>
<dependency org="org.codehaus.castor" name="castor-xml" rev="1.3.3" conf="test->*"/>
@@ -13,7 +13,8 @@
<dependency org="commons-digester" name="commons-digester" rev="2.1" conf="test->*"/>
<dependency org="commons-lang" name="commons-lang" rev="2.6" conf="test->*"/>
<dependency org="commons-logging" name="commons-logging" rev="1.1.1" conf="test->*"/>
<dependency org="org.apache.poi" name="poi-ooxml" rev="3.14" conf="test->*"/>
<dependency org="org.apache.poi" name="poi" rev="3.14" conf="test->*"/>
<dependency org="org.apache.commons" name="commons-collections4" rev="4.1" conf="test->*"/>
<dependency org="org.apache.poi" name="poi-ooxml" rev="3.15" conf="test->*"/>
<dependency org="org.apache.poi" name="poi" rev="3.15" conf="test->*"/>
</dependencies>
</ivy-module>
@@ -4,7 +4,7 @@
</info>
<dependencies>
<dependency org="dom4j" name="dom4j" rev="1.6.1" conf="test->*"/>
<dependency org="org.apache.poi" name="poi-ooxml-schemas" rev="3.14" conf="test->*"/>
<dependency org="org.apache.poi" name="poi-ooxml-schemas" rev="3.15" conf="test->*"/>
<dependency org="org.apache.xmlbeans" name="xmlbeans" rev="2.6.0" conf="test->*"/>
</dependencies>
</ivy-module>
@@ -37,15 +37,16 @@
<dependency org="net.sourceforge.barbecue" name="barbecue" rev="1.5-beta1"/>
<dependency org="net.sourceforge.jexcelapi" name="jxl" rev="2.6.10"/>
<dependency org="org.apache.ant" name="ant" rev="1.7.1"/>
<dependency org="org.apache.commons" name="commons-collections4" rev="4.1" conf="test->*"/>
<dependency org="org.apache.commons" name="commons-javaflow" rev="20160505"/>
<dependency org="org.apache.commons" name="commons-pool2" rev="2.4.2"/>
<dependency org="org.apache.httpcomponents" name="httpclient" rev="4.3.6"/>
<dependency org="org.apache.httpcomponents" name="httpcore" rev="4.3.3"/>
<dependency org="org.apache.lucene" name="lucene-analyzers-common" rev="4.5.1"/>
<dependency org="org.apache.lucene" name="lucene-core" rev="4.5.1"/>
<dependency org="org.apache.lucene" name="lucene-queryparser" rev="4.5.1"/>
<dependency org="org.apache.poi" name="poi-ooxml" rev="3.14"/>
<dependency org="org.apache.poi" name="poi" rev="3.14"/>
<dependency org="org.apache.poi" name="poi-ooxml" rev="3.15"/>
<dependency org="org.apache.poi" name="poi" rev="3.15"/>
<dependency org="org.apache.velocity" name="velocity" rev="1.7"/>
<dependency org="org.apache.xmlgraphics" name="batik-anim" rev="1.8"/>
<dependency org="org.apache.xmlgraphics" name="batik-awt-util" rev="1.8"/>
@@ -288,7 +288,7 @@
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.14</version>
<version>3.15</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
@@ -459,7 +459,7 @@
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.14</version>
<version>3.15</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
@@ -33,6 +33,7 @@
import java.util.Map;

import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.FormulaEvaluator;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
@@ -237,16 +238,16 @@ public Object getFieldValue(JRField jrField) throws JRException
{
return null;
}
if(cell.getCellType() == Cell.CELL_TYPE_FORMULA)
if (cell.getCellTypeEnum() == CellType.FORMULA)
{
FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
Object value = null;
switch (evaluator.evaluateFormulaCell(cell))
switch (evaluator.evaluateFormulaCellEnum(cell))
{
case Cell.CELL_TYPE_BOOLEAN:
case BOOLEAN:
value = cell.getBooleanCellValue();
break;
case Cell.CELL_TYPE_NUMERIC:
case NUMERIC:
if(Date.class.isAssignableFrom(valueClass))
{
value = cell.getDateCellValue();
@@ -256,7 +257,7 @@ public Object getFieldValue(JRField jrField) throws JRException
value = cell.getNumericCellValue();
}
break;
case Cell.CELL_TYPE_STRING:
case STRING:
value = cell.getStringCellValue();
if(Date.class.isAssignableFrom(valueClass))
{
@@ -295,9 +296,9 @@ else if (Number.class.isAssignableFrom(valueClass))
}
}
break;
case Cell.CELL_TYPE_BLANK:
case Cell.CELL_TYPE_ERROR:
case Cell.CELL_TYPE_FORMULA:
case BLANK:
case ERROR:
case FORMULA:
default:
break;
}
@@ -310,7 +311,7 @@ else if (Number.class.isAssignableFrom(valueClass))
}
if (valueClass.equals(Boolean.class))
{
if (cell.getCellType() == Cell.CELL_TYPE_BOOLEAN)
if (cell.getCellTypeEnum() == CellType.BOOLEAN)
{
return cell.getBooleanCellValue();
}
@@ -329,7 +330,7 @@ else if (Number.class.isAssignableFrom(valueClass))
}
else if (Number.class.isAssignableFrom(valueClass))
{
if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC)
if (cell.getCellTypeEnum() == CellType.NUMERIC)
{
return convertNumber(cell.getNumericCellValue(), valueClass);
}
@@ -355,7 +356,7 @@ else if (Number.class.isAssignableFrom(valueClass))
}
else if (Date.class.isAssignableFrom(valueClass))
{
if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC)
if (cell.getCellTypeEnum() == CellType.NUMERIC)
{
return cell.getDateCellValue();
}
Oops, something went wrong.

0 comments on commit b7bd874

Please sign in to comment.
You can’t perform that action at this time.