无法使用c#asp.net在Excel应用程序中写入数据运行时 [英] Unable to write data runtime in Excel app using c# asp.net

查看:98
本文介绍了无法使用c#asp.net在Excel应用程序中写入数据运行时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到错误:
System.Runtime.InteropServices.COMException(0x800A03EC):Microsoft Office Excel无法打开或保存更多文档,因为没有足够的可用内存或磁盘空间. •要提供更多的内存,请关闭不再需要的工作簿或程序. •要释放磁盘空间,请从要保存到的磁盘中删除不再需要的文件.

在生产环境中的服务器2008中部署我的APP时遇到此错误.

在本地工作正常.

我正在使用Excel 2007写入数据.同样,我也已经安装在服务器中.

我的功能要求是我们需要在Excel运行时中编写数据并作为附件发送到邮件中.


我已经使用COMPOnent Service授予了所有权限,并且尝试将Identity更改为管理员以运行应用程序.然后也会遇到同样的问题.

任何人都可以在此方面帮助我,因为此解决方案非常紧急.

预先感谢.

I am getting error:
System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Office Excel cannot open or save any more documents because there is not enough available memory or disk space. • To make more memory available, close workbooks or programs you no longer need. • To free disk space, delete files you no longer need from the disk you are saving to.

This error I get while I deployed my APP in server 2008 in production envirnment.

Locally it''s working fine.

I am using Excel 2007 to write data. and same I have installed in server also.

My functional requirement is we need to write data in Excel runtime and to send as an attachment in mail.


I have already given all permission using COMPOnent Service and I tried changeing Identity to administrator to run app. Then also getting same issue.

Anybody can help me on this as this solution is bit urgent.

Thanks in advance.

推荐答案

修复权限(Windows Server 2008)

A.Windows 2008 Server x64

请创建此文件夹:
Fixing permissions (Windows server 2008)

A.Windows 2008 Server x64

Please make this folder:
C:\Windows\SysWOW64\config\systemprofile\Desktop


并向这些文件夹中的"IIS AppPool \ DefaultAppPool"用户授予写权限:


And give write permissions to the "IIS AppPool\DefaultAppPool" user in those folders:

C:\Windows\SysWOW64\config\systemprofile\Desktop
C:\Windows\SysWOW64\config\systemprofile\AppData\Roaming\Microsoft
C:\Windows\SysWOW64\config\systemprofile\AppData\Local\Microsoft



B.Windows 2008 Server x86

请创建此文件夹:



B.Windows 2008 Server x86

Please make this folder:

C:\Windows\System32\config\systemprofile\Desktop


并向这些文件夹中的"IIS AppPool \ DefaultAppPool"用户授予写权限:


And give write permissions to the "IIS AppPool\DefaultAppPool" user in those folders:

C:\Windows\System32\config\systemprofile\Desktop
C:\Windows\System32\config\systemprofile\AppData\Roaming\Microsoft
C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft


如果您有可用的磁盘空间,那么肯定是权限问题吗?即使您认为不可能,但还有什么可能呢?
If you have disc space available, then it has to be a permissions issue, surely ? Even if you think it can''t be, what else can it be ?


我认为当打开太多excel实例时就会发生这种情况.使用后,您的com对象未正确释放.错误即将发生时,请检查您的任务管理器,然后在应用程序"选项卡中查找Excel.exe.如果您发现许多Excel.Exe实例,则需要在使用后显式释放COM对象,然后重新创建另一个excel应用程序.
I think this is happening when too many instances of excel has been opened. Your com object was not released properly after use. Check your Task manager while the error is comming and look for Excel.exe in application tab. If you find so many instances of Excel.Exe then you need to release the COM object explicitly after use and re-create another excel application.


这篇关于无法使用c#asp.net在Excel应用程序中写入数据运行时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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