wood burning stoves 2.0*
The moose likes Groovy and the fly likes Calling valueOf () of apache POI in Groovy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Calling valueOf () of apache POI in Groovy " Watch "Calling valueOf () of apache POI in Groovy " New topic
Author

Calling valueOf () of apache POI in Groovy

Yellapa Adepu
Ranch Hand

Joined: Jan 17, 2006
Posts: 34
Hello All,
I am trying save an excel sheeting using apache POI from a groovy class. But I getting a type casting exception not sure how to resolve it. Your help is much appreciated.


I am trying to add conditional formatting to the excel sheet, per apache POI here is the code. Here is my code snippet in groovy (because of this issue, am trying to as near as possible to Java in this logic)




While executing when it comes 'CellRangeAddress[] regions = {CellRangeAddress.valueOf("E2:E32")};' it throws

[java] 2012-08-09 22:52:13,487 ERROR GroovyTaskWrapper - Error occured while :[EXECUTE] Cannot cast object 'Excel$_addDataBars_closure9@1f635484' with class 'Excel$_addDataBars_closure9' to class 'org.apache.poi.hssf.util.CellRangeAddress'

For additional information: Here is the example form Apache POI http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java
I am trying to follow the below snippet



Thanks,
YA


Yellapa Adepu<br />SCEA
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling valueOf () of apache POI in Groovy
 
Similar Threads
Read a range of cells in MS Excel using POI API
unable to open excel document
Converting a Word doc into a Gui.
Query Regarding Reading Excel files at Runtime
Detect filter in excel sheet using Apache POI