String driverName = "sun.jdbc.odbc.JdbcOdbcDriver";
String excel_path="C:\\employee.xls";
String Connection_str="jdbc:odbcriver={Microsoft Excel Driver(*.xls)};DBQ="+ excel_path +";DriverID=22;READONLY=false;";
try {
Class.forName(driverName);
Connection con = DriverManager.getConnection(Connection_str,"","");
} catch (SQLException e) {....
This is your coding. And you have not mentioned the excel_path value in proper way. That is why you are getting this exception error.
String excel_path="C:\\employee.xls";
This must be as
Code:
String excel_path="C:/employee.xls";
Do this change and execute your program. You would not get any error.
Bookmarks