File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Groovy and the fly likes Groovy SQL query to Excel output Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Groovy SQL query to Excel output" Watch "Groovy SQL query to Excel output" New topic

Groovy SQL query to Excel output

Mark Ediger

Joined: Jun 16, 2012
Posts: 1
I have a hopefully simple question from a beginner...
My sql.eachRow query returns two numbers from two rows (in the "ID" column), as it should. But using the JExcel API, I cannot get the code to insert the two numbers on top of each other in my excel sheet.

And I get the following error: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: jxl.write.Label(java.lang.Integer, java.lang.Integer, java.lang.Long)

I know my JExcel API is working, so is my sql call...I am able to add individual cells, one at a time, into my XL sheet. But it crashes when my .eachRow closure needs to iterate over more than one result. Am I messing up with the class of what I'm returning? I'm using Groovy 1.8.6. Thanks.

Varghese Paul

Joined: Aug 02, 2004
Posts: 14
JExcel Label API has a method signature of Label(int , int , java.lang.String)
I agree. Here's the link:
subject: Groovy SQL query to Excel output
It's not a secret anymore!