import java.sql.Connection;
import java.sql.DriverManager;
public class Main {
public static void main(String[] argv) throws 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, "", "");
}
}
import java.sql.DriverManager;
public class Main {
public static void main(String[] argv) throws 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, "", "");
}
}
i am not able to read int as int it is returning double.can you please help.
ReplyDeleteExcel values:1,2,3
Program reads it as:1.0,2.0,3.0