在Windows 2008服务器R2上,Microsoft.ACE.OLEDB.12.0“外部表格未达到预期格式”错误 [英] Microsoft.ACE.OLEDB.12.0 'External table is not in the expected format' error on Windows 2008 server R2
问题描述
您好,
使用 OLEDB 12.0读取Excel文件(.xlsx,office 2010)时出现以下错误:"外部表格不是在预期的格式中,当我删除"IMEX = 1"时,从连接字符串中读取错误的文件和
成功读取文件。
While reading an excel file ( .xlsx , office 2010) using the OLEDB 12.0 I am getting the following error "External table is not in the expected format", when I removed the "IMEX=1" from the connection string the error diapered and the file was read successfully.
我们如何使用"IMEX = 1"读取文件?在连接字符串中,因为excel文件具有混合数据列。
How can we read the file with the "IMEX=1" in the connection string as the excel file has a mixed data column.
推荐答案
这将有助于发布您的连接字符串。它应该类似于以下内容:
It would help to post your connection string. It should look something like the following:
ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=C:\Documents and Settings\...\My Documents\My Database\Excel\Book2007.xlsx;" & _
"Extended Properties=""Excel 12.0 Xml;HDR=YES;IMEX=1"""
这篇关于在Windows 2008服务器R2上,Microsoft.ACE.OLEDB.12.0“外部表格未达到预期格式”错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!