import java.io.*; import java.net.*; import java.sql.*; import java.util.*; public class EmployeeReader{ public static final String DRIVER_NAME = "sun.jdbc.odbc.JdbcOdbcDriver"; public static final String DATABASE_URL = "jdbc:odbc:Test"; public static void main(String[] args) throws ClassNotFoundException, SQLException{ Class.forName(DRIVER_NAME); Connection con = null; try { con = DriverManager.getConnection(DATABASE_URL); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("select ID, ACTIVE, EMAIL_ADDRESS from [Sheet1$]"); while (rs.next()) { String lname = rs.getString(1); String fname = rs.getString(2); String email = rs.getString(3); System.out.println(fname + " " + lname + " "+ email ); } rs.close(); stmt.close(); } finally { if (con != null) con.close(); } } }