Ti avevo già indicato che devi usare ExecuteScalar()
quindi dovrai usare un OleDbCommand (e NON un OleDbDataAdapter).
e da
";Extended Properties=Excel 8.0;HDR=No";
elimina
;HDR=No
Excel.Range ExcelRange = new Excel.Range();
non serve a niente.
Ti avevo già indicato che devi usare ExecuteScalar()
quindi dovrai usare un OleDbCommand (e NON un OleDbDataAdapter).
e da
";Extended Properties=Excel 8.0;HDR=No";
elimina
;HDR=No
Excel.Range ExcelRange = new Excel.Range();
non serve a niente.