[英]Exception from HRESULT: 0x800A03EC
Any help is appreciated: 任何帮助表示赞赏:
I'm developing a C#.Net app in VS2010 that interacts with Excel. 我正在VS2010中开发一个与Excel交互的C#.Net应用程序。 The app works correctly on my local machine.
该应用程序在我的本地计算机上正常运行 Uploading to a remote Windows 2003 server however, breaks the app.
然而,上传到远程Windows 2003服务器会破坏应用程序。
Originally, I received the following message 最初,我收到以下消息
After Googling the problem (which suggested a permissions problem) i tried this: 谷歌搜索问题(这表明权限问题)我试过这个:
Now I get this message on the same operation: 现在我在同一个操作上收到此消息:
Google searches seem to be suggesting that this is a version match error. Google搜索似乎暗示这是版本匹配错误。 However, both the local machine and the remote server use Excel 2007.
但是,本地计算机和远程服务器都使用Excel 2007。
Any suggestions would be very welcome. 任何建议都会非常受欢迎。 Thanks in advance.
提前致谢。
-Daniel -Daniel
If you are trying to send a datagridview to an Excel spreadsheet, remember that Excel cells start at Cell (1,1) but datagridview.rows and datagridview.columns are indexed at 0. So if you try to send the contents of datagridviewcell(0,0) to the Excel Cell (0,0), you'll get Exception from HRESULT: 0x800A03EC 如果您尝试将datagridview发送到Excel电子表格,请记住Excel单元格从Cell(1,1)开始,但datagridview.rows和datagridview.columns的索引为0.因此,如果您尝试发送datagridviewcell的内容(0 ,0)到Excel单元格(0,0),您将从HRESULT获得异常:0x800A03EC
I was googling around frantically for a good 15 minutes before slamming my palm into my forehead for that one. 我疯狂地搜索了大约15分钟,然后将我的手掌撞到了我的额头上。
Excel.Cells(0,0)=Datagridviewcellvalue // throws HRESULT: 0x800A03EC error
Excel.Cells(1,1) = Datagridviewcellvalue //no error
Delete the temporary ASP.Net files from "C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\Temporary ASP.NET Files" this folder, Please check after this. 从“C:\\ WINDOWS \\ Microsoft.NET \\ Framework \\ v2.0.50727 \\ Temporary ASP.NET Files”这个文件夹中删除临时ASP.Net文件,请在此之后检查。
After checking also its not working then restart System and check... There is a chance to occur this because of corrupted files. 检查后它还没有工作然后重新启动系统并检查...由于文件损坏,有可能发生这种情况。 So do a disc checking.
所以进行光盘检查。
Thank you 谢谢
Suggestions: 建议:
I was able to resolve this problem by wholesale disabling of all add-ins, and restarting the app. 我能够通过批量禁用所有加载项并重新启动应用程序来解决此问题。 Then I re-enabled the useful ones, watching Excel behavior.
然后我重新启用有用的,看Excel行为。 YMMV
因人而异
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.