This sample code opens an excel file and loads the values in a data reader. I would like to read the cell values of the first row only and put that in a combobox.
This is what I have so far:
OleDbConnection dbConnection = new OleDbConnection(_fileName);
OleDbCommand dbCommand = new OleDbCommand("SELECT * FROM [" + this.cboWorksheets.Text + "]", dbConnection);
OleDbDataReader dbReader = dbCommand.ExecuteReader();
int i = 0;
if (i == 0) // first row only