1
欲讀取使用ODBC
,從Excel
文件字符串時我與下面的代碼讀取它們,像讀數(UTF-8)從Excel字符串ODBC
所示?? ??? ???????? ??? ?????? ?? ? ? ??? ? ?
我的代碼:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("jdbc:odbc:excelD");
Statement stm = conn.createStatement();
ResultSet rs = stm.executeQuery("select * from [sheet3$]");
BufferedWriter out = new BufferedWriter(new FileWriter(new File("Resullt.txt"),true));
while (rs.next()) {
out.write((rs.getString(1)));
}
rs.close();
stm.close();
到上你的解決方案的描述將是一件好事。 –