从Excel导入到SQL [英] Import from Excel to SQL
本文介绍了从Excel导入到SQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨!
我尝试使用以下方法将数据从excel导入到sql中:
Hi!
I tried to import data from excel to sql using following method:
EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
EXEC sp_configure 'Ad Hoc Distributed Queries', 1;
GO
RECONFIGURE;
GO
INSERT INTO dbo.Reason_Mst (varReasonCode,varReasonDesc)
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 11.0;Database=\\Dbserver\DESKTOP REDIRECT\IT\vcsit26\Desktop\OPC-Masters.xls',
'SELECT * FROM [Reject_reason$]')
但我得到了错误:
从Excel导入
But i got the error:
Error while importing from excel to sql server
OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" returned message "Could not find installable ISAM.".
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".
推荐答案
')
但我得到了错误:
从Excel导入
But i got the error:
Error while importing from excel to sql server
OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" returned message "Could not find installable ISAM.".
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".
一个修复程序可能是重新安装MDAC .
http://support.microsoft.com/default.aspx/kb/283881 [ ^ ]
http://support.microsoft.com/default.aspx/kb/209805 [ ^ ]
http://support.microsoft.com/default.aspx/kb/90111 [ ^ ]
A fix for that could be to re-install MDAC.
http://support.microsoft.com/default.aspx/kb/283881[^]
http://support.microsoft.com/default.aspx/kb/209805[^]
http://support.microsoft.com/default.aspx/kb/90111[^]
这篇关于从Excel导入到SQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文