Welcome to JavaRanch. Please look carefully at the official naming policy at Javaranch & reregister yourself with a proper first & last name, with a space between them. Initials may be used for a first name, but not a last name. Please adhere to official naming policy & help maintain the decorum of the forum. The naming policy can be found at http://www.javaranch.com/name.jsp
Read the whole "Create Your Own Type 3 JDBC Driver" series:
Part 1: Connect your Java applications to databases�the easy way
Part 2: Compile, deploy, and access data using your custom-built JDBC driver
Part 3: Enhance the custom JWDriver with advanced logging, connection pooling, and Predefined Data Sets
In this three-part series, we first introduce our own type 3 JDBC driver's architecture and design (Part 1), then show how to implement and deploy the driver (Part 2), and finish by explaining how you can add advanced features to the driver, like SQL logging or connection pooling (Part 3).
Note: Before you read this article, you may wish to read Nitin Nanda's "JDBC Drivers in the Wild" (JavaWorld, July 2000) to better understand JDBC drivers.
I found that by googling for "excel jdbc", by the way.
[ August 22, 2008: Message edited by: Ulf Dittmer ]
Yes, it was copied from http://www.roseindia.net/software-tutorials/detail/3723.
Originally posted by Ulf Dittmer:
welcome to JavaRanch. What you posted seems copied from somewhere; you need to provide the source from where you got that, lest it look like plagiarism.
(Ironically it is easier to read here than it is in its original location, where it's crammed in among a sea of advertising.)
Excel has an inbuilt query wizard which allows you to connect to a database and execute queries.
I will start you off in the right direction:
Open an excel sheet
Click on data->Import External Data->New database query
This will open data source selector
While on database tab select <New data source> and hit ok
Now you can select whatever is applicable in your case and start writing queries.
If you just want to import data from a database into excel you don't need JDBC to do that.[/QB]
The original post explicitly states "can any one help me how to connect MS excel file to java", so using Excel manually doesn't solve the problem.
If this was my problem I'd use POI, not JDBC, though.