Sunday, December 23, 2012

Use JDBC ODBC bridge to read from Excel

4:48 AM

import java.sql.Connection;
import java.sql.DriverManager;

public class Main {
  public static void main(String[] argvthrows Exception {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String myDB = "jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=c:/data.xls;"
        "DriverID=22;READONLY=false";
    Connection con = DriverManager.getConnection(myDB, """");
  }
}

Written by

We are one of the initiators of the development of information technology in understanding the need for a solution that is familiar and close to us.

0 comments:

Post a Comment

 

© 2013 Klick Dev. All rights resevered.

Back To Top