Excel .xlsx VBA 从共享点打开文件时出现 ADODB 连接错误
Excel .xlsx VBA ADODB connection error when opening file from sharepoint
我正在尝试从共享点位置读取文件。从本地驱动器读取时,代码工作得很好。
另请注意,文件类型为 .xlsx
如果我将文件转换为 .xls,无论文件是在服务器上还是在本地路径上,代码都可以正常工作。
objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & dataPath & ";" & _
"Extended Properties=""Excel 8.0;HDR=No;"";"
收到错误
External table is not in the expected format.
直接连接到 Sharepoint 服务器以访问文件会产生很多问题。
例如
- 上面已经描述了 1 个问题;
- 2 问题是每次计算机启动时您都必须手动连接到共享点,然后程序才能读取文件。
更好的连接方式可以参考以下答案:
Get the content of a sharepoint folder with Excel VBA
我正在尝试从共享点位置读取文件。从本地驱动器读取时,代码工作得很好。 另请注意,文件类型为 .xlsx 如果我将文件转换为 .xls,无论文件是在服务器上还是在本地路径上,代码都可以正常工作。
objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & dataPath & ";" & _
"Extended Properties=""Excel 8.0;HDR=No;"";"
收到错误
External table is not in the expected format.
直接连接到 Sharepoint 服务器以访问文件会产生很多问题。
例如
- 上面已经描述了 1 个问题;
- 2 问题是每次计算机启动时您都必须手动连接到共享点,然后程序才能读取文件。
更好的连接方式可以参考以下答案:
Get the content of a sharepoint folder with Excel VBA