Excel Interop Object.Location(XlChartLocation.xlLocationAsNewSheet)-0x800A03EC [英] Excel Interop Object.Location(XlChartLocation.xlLocationAsNewSheet) - 0x800A03EC

查看:67
本文介绍了Excel Interop Object.Location(XlChartLocation.xlLocationAsNewSheet)-0x800A03EC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在对现有应用程序进行开发工作.报告是使用14.0版的excel互操作程序集生成的

当生成这种特定类型的报告时,我得到了这个著名的错误"HRESULT" 0x800A03EC,我研究了有关codeproject,stackoverflow,bytes.net的论坛,它们给出了混合的结果-有人说,当您打开现有文件时,有人说了保存当您保存文件时->我两个都不做.

任何帮助将是非常有益的:)

非常感谢,

错误代码如下

I am doing dev work on an existing app. The reports are being generated using excel interop assembly, version 14.0

When generating this specific type of report, I am getting this famous error "HRESULT "0x800A03EC, I have researched the forums on codeproject, stackoverflow, bytes.net and they give mixed results - some say its when u open an existing file, some save when u saving a file --> I am doing neither of the two.

Any help would be very beneficial :)

Many thanks,

The faulting code is below

Object.Location(XlChartLocation.xlLocationAsNewSheet, strSheetName);


//strSheetName是测试表"
//对象不为空


//strSheetName is "Test sheet"
//Object is not null

推荐答案

我遇到了类似的问题,可以通过以下操作来解决它

1.转到DCOM Config,找到Microsoft Excel Application,转到其属性的安全性选项卡,选择自定义",在启动和激活权限"下,单击编辑并添加正在运行该应用程序的帐户",然后分配本地启动和运行".本地激活权限.


2.如果"Desktop"文件夹在以下位置不存在,则创建一个"Desktop"文件夹,具体取决于系统上安装了哪个版本的Office
64位办公室:C:\ Windows \ System32 \ config \ systemprofile
32位办公室:C:\ Windows \ SysWOW64 \ config \ systemprofile
然后转到桌面"属性的安全选项卡,并使用默认权限运行应用程序运行的帐户(读取并执行;列出文件夹内容;读取")

注意:System32仅适用于64位,因此请不要混淆.

希望这对您也有帮助.
I faced a similar issue like this and I could resolve it by doing the following things

1. Go to DCOM Config, find Microsoft Excel Application,go to the security tab of its properties, Select Customize, under Launch and Activation Permissions,click Edit and Add the account under which the application is running and assign Local Launch & Local Activation permissions.


2. Create a "Desktop" folder if it doesn''t exists at the following location depending on which version of office is installed on your system
64bit Office: C:\Windows\System32\config\systemprofile
32bit Office: C:\Windows\SysWOW64\config\systemprofile
Then go to security tab of the properties of the "Desktop", and the account under which the application is running with default permissions (Read & execute; List folder contents; Read)

Note: System32 is for 64 bit only, so don''t be confused.

Hope this helps in your case also.


这篇关于Excel Interop Object.Location(XlChartLocation.xlLocationAsNewSheet)-0x800A03EC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆