This type of error occur when we use “IMEX=1” in the connection string of excel file.
String strConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + ExcelPath + FileName + ";Extended Properties=Excel 12.0;Persist Security Info=False;IMEX=1;ImportMixedTypes=Text";
To Avoid this error. We have to use Single Quotes in the Extended Properties.
String strConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + ExcelPath + FileName + ";Extended Properties='Excel 12.0;Persist Security Info=False;IMEX=1;ImportMixedTypes=Text'";