I have a connection string with excel, but it is only .xlsx and is giving this error
ServerVersion = 'connExcel.ServerVersion' threw an exception of type 'System.InvalidOperationException'
I need a connection with both at the same time, as I can have the 2 file types at the time of reading.
string strExcelConn = "Provider=Microsoft.ACE.OLEDB.12.0;" +
"Data Source = " + txtArquivo.Text + ";" + "Extend Properties=Excel 12.0 xml; HDR = YES";