A
Andyli
Unregistered / Unconfirmed
GUEST, unregistred user!
文件路徑絕對沒錯,有Sheet1的檔。Sql 2005打了Sp2補丁。<br><br>在查詢分析器中執行如下語句<br>SELECT *<br>FROM openrowset('MICROSOFT.JET.OLEDB.4.0','Excel 8.0;HDR=YES;DATABASE=e:/a.xls','select * from [Sheet1$]')<br><br>錯誤提示:<br>OLE DB provider "MICROSOFT.JET.OLEDB.4.0" for linked server "(null)" returned message "Microsoft Jet 資料庫引擎無法找到 'Sheet1$' 物件。請確定這個物件存在,而且您沒有將物件的名稱及路徑拼錯。".<br>Msg 7350, Level 16, State 2, Line 1<br>Cannot get the column information from OLE DB provider "MICROSOFT.JET.OLEDB.4.0" for linked server "(null)".<br><br>執行:<br>SELECT * FROM<br>OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source="E:/a.xls";User ID=Admin;Password=;Extended properties=Excel 8.0')...[Sheet1$]<br>提示:<br>Msg 7314, Level 16, State 1, Line 1<br>The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" does not contain the table "Sheet1$". The table either does not exist or the current user does not have permissions on that table.<br><br>執行:<br>select *<br>from openrowset('Microsoft.Jet.OLEDB.4.0','EXCEL 8.0;HDR=NO;User id=admin;Password=;IMEX=1;<br>DATABASE=e:/a.xls',[sheet1$])<br>提示:<br>Msg 7399, Level 16, State 1, Line 1<br>The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" reported an error. The provider did not give any information about the error.<br>Msg 7303, Level 16, State 1, Line 1<br>Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".<br><br>路徑絕對沒錯,Excel是2003的,執行語句的過程中,沒有開啟任何Excel文件.<br><br>查了N多網頁都沒有找到解決方法,大家幫幫忙,問題出在那裡?