vb代碼如下:
Dim DS As System.Data.DataSet
Dim MyCommand As System.Data.OleDb.OleDbDataAdapter
Dim MyConnection As System.Data.OleDb.OleDbConnectionMyConnection = New System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0; data source=D:\工作報告\現有ERP使用者名單.XLS; Extended Properties=Excel 10.0;")
MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * from [Sheet1$]",MyConnection)DS = New System.Data.DataSet
MyCommand.Fill(DS, "[Sheet1$]")
DataGrid1.DataSource = DS.Tables("[Sheet1$]").DefaultViewDataGrid1.DataBind()
MyConnection.Close()錯誤如下:
找不到可安裝的 ISAM。 
描述: 在執行目前 Web 要求的過程中發生未處理的例外情形。請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。 例外詳細資訊: System.Data.OleDb.OleDbException: 找不到可安裝的 ISAM。原始程式錯誤: 
行 37: 
行 38:         DS = New System.Data.DataSet
行 39:         MyCommand.Fill(DS, "[Sheet1$]")
行 40:         DataGrid1.DataSource = DS.Tables("[Sheet1$]").DefaultView
行 41: 
 
在msdn中找到如下信息:
Knowledge Base  XL7: Data Access Object Doesn't Install Lotus ISAM DriverPSS ID Number: Q132218Article Last Modified on 03-21-2001
--------------------------------------------------------------------------------
The information in this article applies to: Microsoft Excel for Windows 95 7.0--------------------------------------------------------------------------------
Symptoms
When you use the OpenDatabase method to access a Lotus database, you may receive the error: Run-time Error 3170:
Couldn't Find installable ISAM Cause
Microsoft Excel 7.0 includes the Data Access Object (DAO) for Visual Basic to allow you to access external databases. However, this DAO does not include the Lotus ISAM driver.Note that Data Access Object Help may be misleading because it contains an "Accessing Data in a Lotus Spreadsheet with DAO" topic. Workaround
If you need to use a Lotus database with DAO, first open the Lotus file in Microsoft Excel and then save the file in the Microsoft Excel format. More Information
The DAO Help file is shared among other Microsoft application, some of which may install a Lotus ISAM driver.. However, you do not need to install a Lotus ISAM driver to use Lotus data in Microsoft Excel. Lotus 1-2-3 is manufactured by Lotus Corp., a vendor independent of Microsoft; we make no warranty, implied or otherwise, regarding this products' performance or reliability. Additional query words: WKS WK1 WK3 Keywords: 
Issue Type: 
Technology: kbExcelSearch kbExcel95 kbExcel95Search kbExcelWinSearch 請各位高手指點,補充一點,我是用繁體office xp,謝謝!

解决方案 »

  1.   

    請教tigerwen01(小虎)(編程藝朮化):
    用office xp 不行嗎?
    照你指點的,如果改裝繁體office 2000行不?
    我去試下先.謝謝!
      

  2.   

    改裝office 2000,問題依舊啊!
      

  3.   

    把连接串该为:provider=Microsoft.Jet.OLEDB.4.0; data source=D:\工作報告\現有ERP使用者名單.XLS; Extended Properties=Excel 8.0;
      

  4.   

    If you need to use a Lotus database with DAO, first open the Lotus file in Microsoft Excel and then save the file in the Microsoft Excel format. 
    ====================================================================
    看看你的excel文档是否包含了lotus对象
      

  5.   

    回復sunheartlee(心晴) :我是寫的Extended Properties=Excel 8.0,還是搞不定.請教shalen520(Love will keep us alive):
    我不知道lotus對象是什么東西,也好象從沒有用過.那個excel檔案是我自己建立的,只是記錄了ERP使用者名單,包括部門,工號,姓名,以及備注.連公式都沒有使用,應該來說是全是MS的東西,不知道跟lotus公司產品有什么關聯.
      

  6.   

    你的代码里好象没有MyConnection.open(),没打开应该不行吧?