File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes JDBC and MS Excel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC and MS Excel" Watch "JDBC and MS Excel" New topic
Author

JDBC and MS Excel

Nikhil Raste
Greenhorn

Joined: Dec 02, 2003
Posts: 1
Hello,
I am not able to insert values into an excel file using JDBC. I am attaching the code herewith;
import java.sql.*;
public class jdbctoexcel2
{
public static void main (String Args[])
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con = DriverManager.getConnection("jdbc dbc:excel");
Statement st = con.createStatement();
st.executeUpdate("insert into Sheet1$ values ('1','1')");



st.close();
con.close();
}
catch (Exception e) { System.out.println(e); }
}
}
Can anyone help me out with this??
Chris Brat
Ranch Hand

Joined: May 22, 2003
Posts: 108
can you give a little more information regarding the exception?


SCJP 1.2, SCJP 5, SCBCD
 
 
subject: JDBC and MS Excel