public class p { public static void main(String[] args) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:worcester"); Statement st = con.createStatement(); //ResultSet rs1 = st.executeQuery("Select * from [sheet1$]"); // while(rs1.next()) // { // } String s1="insert into [sheet1$] values('meena.java','5','null','null','null')"; st.executeUpdate(s1); st.close(); con.close(); } catch (Exception ex) { System.err.print("Exception: "); System.err.println(ex.getMessage()); } }