更新时间:2023-09-10 20:33:52
你可能使用了错误的连接字符串。
对于XLSX文件:Provider = Microsoft.ACE.OLEDB.12.0; Data Source =+ [filepath] +; Extended Properties = Excel 12.0;
对于XLS文件:Provider = Microsoft.Jet.OLEDB。 4.0; &安培; 数据源=+ [文件路径] +;扩展属性=Excel 8.0; HDR = YES;
You're probably using the wrong connection string.
For XLSX files:"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + [filepath] + ";Extended Properties=Excel 12.0";
For XLS files:"Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" + [filepath] + ";Extended Properties="Excel 8.0;HDR=YES;"