“外部表的格式不正确。” 尝试使用带有以下连接字符串的Excel
2007文件时,通常会发生这种情况:Microsoft.Jet.OLEDB.4.0和Extended Properties = Excel 8.0
使用以下连接字符串似乎可以解决大多数问题。
public static string path = @"C:srcRedirectApplicationRedirectApplication301s.xlsx";public static string connStr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=Excel 12.0;";



