Both connection strings are invalid.
For .xlsx this should be:
StrConn = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + srcFile + ";Extended Properties=\"Excel 12.0 Xml;HDR=YES;IMEX=1\";";
(Pay attention to the additional part of Xml, HDR = YES, to indicate that your file has headers, IMEX = 1 to process all data as text and an overridden semi-colony. You will need different connection strings for .xlsm and .xlsb files - see . here )
For .xls, this should be:
StrConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + srcFile + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1\";";
(Note the change from Excel 1.0 to Excel 8.0 and the addition of a colon at the end)
source share