标题:未能确定 COM 引用“Excel”的依赖项。加载类型库/DLL 时出错???
只看楼主
changshaoxi
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-5-12
 问题点数:0 回复次数:0 
未能确定 COM 引用“Excel”的依赖项。加载类型库/DLL 时出错???
'已经添加引用Microsoft Active Date Objects 2.8 Library与Microsoft Excel 11.0 Objects Library
Imports 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
'恳请高手赐教???
搜索更多相关主题的帖子: excel Microsoft Excel 
2012-03-12 00:12



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-362881-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 2.055036 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved