Excel 导入表出错
我用这个语句把Excel 内容导入一个表dylen,老出这样的错(但是有时候可以)。请帮解决一下,谢谢。。
select * into dylen from OpenDataSource( 'Microsoft.Jet.OLEDB.4.0 ', 'Data Source= "D:\wu.xls ";User ID=Admin;Password=;Extended properties=Excel 5.0 ')...Sheet1$
出错:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'Microsoft.Jet.OLEDB.4.0 ' reported an error. The provider did not give any information about the error.
[解决办法]
把Excel 5.0改成Excel 8.0
[解决办法]
必须数据库和文件在同一台机器上。
[解决办法]
你是往临时表里导入数据,没有加 # 号,要注意..
select * into #dylen from OpenDataSource( 'Microsoft.Jet.OLEDB.4.0 ', 'Data Source= "D:\wu.xls ";User ID=Admin;Password=;Extended properties=Excel 5.0;Persist Security Info=false ')...Sheet1$