未能确定 COM 引用“Excel”的依赖项。加载类型库/DLL 时出错???
'已经添加引用Microsoft Active Date Objects 2.8 Library与Microsoft Excel 11.0 Objects LibraryImports Excel
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim xlExcel As Application
Dim xlBook As Workbook
Dim xlSheet As Worksheet
xlExcel = CreateObject("Excel.Application") '创建excel对象
xlBook = xlExcel.Workbooks.Open(Filename:="c:\test.xls", Password:="")
xlSheet = xlBook.Worksheets(1)
content.Text = xlSheet.Cells(1, 1).value
End Sub
End Class
'警告:
'1、未能确定 COM 引用“Excel”的依赖项。加载类型库/DLL 时出错。 (异常来自 HRESULT:0x80029C4A (TYPE_E_CANTLOADLIBRARY)) WindowsApplication1
'恳请高手赐教???