Selecting the Excel sheet used range using OLEDB Connection
问题 Is there any way to select the Excel sheet used range via OLEDB Command object? Because I have an Excel file that has 400 rows, but when I delete 200 rows and try to select the sheet again, it's selecting up to 400 rows again instead of selecting the 200 rows. This is the code which I've written to select the sheet: oledbConn = new OleDbConnection(connectionString); oledbCmd = new OleDbCommand("select * from [Sheet1$]", oledbConn); oledbConn.Open(); oledbDr = oledbCmd.ExecuteReader(); while