在Visual Studio 2005中导入Excel时,VISTA中引发错误,由于以下原因,从IClassFactory创建具有CLSID {00020820-0000-0000-C000-000000000046}的COM组件实例失败. [英] While importing Excel in visual studio 2005 Error throws in VISTA Creating an instance of the COM component with CLSID {00020820-0000-0000-C000-000000000046} from the IClassFactory failed due to...
问题描述
Iam在Visual Studio 2005中导入Excel
导入Microsoft.Office.Interop.Excel
我已经创建了这样的实例
昏暗的excel作为新的Microsoft.Office.Interop.Excel.Application
昏暗的wBook作为Microsoft.Office.Interop.Excel.Workbook
昏暗的wSheet作为新的Microsoft.Office.Interop.Excel.Worksheet
wBook = excel.Workbooks.Add()
并使用范围方法进行如下计算:-
''wSheet.Range(A1).Value.ToString''
发生以下错误,它在XP中工作正常
但在VISTA中不起作用
由于以下错误,从IClassFactory创建具有CLSID {00020820-0000-0000-C000-000000000046}的COM组件实例失败,原因是:80010001.
Iam使用Microsoft.Excel 12.0对象库.
请给我一个解决方案
问候
Pratheesh
Iam importing Excel in visual studio 2005
Imports Microsoft.Office.Interop.Excel
I have create Instance Like this
Dim excel As New Microsoft.Office.Interop.Excel.Application
Dim wBook As Microsoft.Office.Interop.Excel.Workbook
Dim wSheet As New Microsoft.Office.Interop.Excel.Worksheet
wBook = excel.Workbooks.Add()
and used Range Method to calucalte as follows:-
''wSheet.Range(A1).Value.ToString''
The Following error occured it''s working fine in XP
but it''s not working in VISTA
Creating an instance of the COM component with CLSID {00020820-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 80010001.
Iam Using Microsoft.Excel 12.0 object Library.
Pls give me a solution
Regards
Pratheesh
推荐答案
我认为问题在于访问权限.
检查用户是否具有访问dll的适当权限. :)
I think the problem is with the access rights.
Check if the user has appropriate permission to access the dll. :)
这篇关于在Visual Studio 2005中导入Excel时,VISTA中引发错误,由于以下原因,从IClassFactory创建具有CLSID {00020820-0000-0000-C000-000000000046}的COM组件实例失败.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!