The Following code reads in Sheet one from the Excel file when the Sheet name is EOM. Is there a way to read in sheet 1 with out specifying the sheet name ?
conn.Open(); string con = null; if (fileType[1] == "xls" || fileType[1] == "xlsx") { con = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + PollFolder + '\\' + fileName + @";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1;ImportMixedTypes=MajorityType;TypeGuessRows=0"""; using (OleDbConnection connection = new OleDbConnection(con)) { connection.Open(); OleDbCommand command = null; command = new OleDbCommand ("SELECT * " +"FROM [EOM$]", connection ); try { using (OleDbDataReader dr = command.ExecuteReader()) { properFormat = 1; while (dr.Read()) {