![]() | Ch 10: Excell and Groovy SQL |
|
03 Nov 2008, 22:38
Eric Blossom (1 post) |
Trying to follow the example on page 163 I get:
groovy> def sql = groovy.sql.Sql.newInstance("""
groovy> jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};
groovy> DBQ=C:/Documents and Settings/me/AssayDB.xls;READONLY=false""", '', '')
groovy> println "000"
groovy> sql.eachrow('SELECT * FROM [Substrates$]') {
groovy> println "${it.name}\t\t${it.abbreviation}"
groovy> }
Exception thrown: java.sql.SQLException: No suitable driver
java.sql.SQLException: No suitable driver
at Script10.run(Script10:1)
I must need to install a driver of some sort? thanks, |
|
04 Nov 2008, 22:38
Venkat Subramaniam (71 posts) |
Eric, Can you go into Control Panel and Data Sources(ODBC) and see if Microsoft Excel Driver is installed. |
|
03 Feb 2010, 13:45
Fred Miller (2 posts) |
I have some Excel spreadsheets in a Unix/Linux environment and I’d like to use Groovy to read and convert the contents to XML. Any recommendations? Looking mainly at the cleanest way to read an Excel file in Unix/Linux. I’m ok with the XML conversion just added it for context. |
|
03 Feb 2010, 15:07
Fred Miller (2 posts) |
Using http://poi.apache.org as a model. |
|
26 Apr 2010, 20:47
Angel Villafranca (1 post) |
Hi Eric, def sql = groovy.sql.Sql.newInstance(””“jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)}; DBQ=C:/MyDataFile.xls;READONLY=false”””, ’’, ’’, ‘sun.jdbc.odbc.JdbcOdbcDriver’) |
| You must be logged in to comment |

