Program Will Not Read First Row in Excel Sheet

I am having difficulty getting my program to read the first row of my excel sheet. When I use the next() method the first time it automatically starts at the second row. Here is what I have for my method that reads the data from an excel file.

package excel;

import java.sql.*;

public class Excel

{

public void readexel(String filename) throws SQLException

{

Connection c = null;

Statement stmnt = null;

try

{

Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );

c = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=" + filename);

stmnt = c.createStatement();

String query = "Select * from [Sheet1$]" ;

ResultSet rs = stmnt.executeQuery( query );

while( rs.next() )

{

System.out.print("Row #" + rs.getRow() + ": ");

System.out.print( rs.getInt(1) + " " );

System.out.print( rs.getInt(2) + " ");

System.out.println( rs.getInt(3) );

}

}

catch( Exception e )

{

System.err.println( e );

}

}

[1091 byte] By [krwhale78a] at [2007-11-27 6:43:46]
# 1
what about inserting an empty line at the beginning of the sheet? !)
calvino_inda at 2007-7-12 18:14:47 > top of Java-index,Java Essentials,Java Programming...
# 2
Thats because the first row typically contains the column headers, and you don't want them read as data. Either insert a blank row, or put in column labels, and than you can get the column labels/names from the ResultSetMetaData.Message was edited by: SomeoneElse
SomeoneElsea at 2007-7-12 18:14:47 > top of Java-index,Java Essentials,Java Programming...