当前上下文不支持此操作–Excel上传到Silverlight datagrid [英] This operation is not supported in the current context –Excel upload to Silverlight datagrid

查看:71
本文介绍了当前上下文不支持此操作–Excel上传到Silverlight datagrid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我已按照此链接中所述的所有步骤将excel上载到Silverlight datagrid..

http://www.kunal-chowdhury.com/2010/05/silverlight-4-interoperability-with.html

,但我在此步骤遇到了问题..

动态lObjExcel = AutomationFactory.CreateObject("Excel.Application");

作为当前上下文不支持此操作."

有什么想法.
谢谢

Hi,
I have followed all the steps to upload excel into Silverlight datagrid as in this link..

http://www.kunal-chowdhury.com/2010/05/silverlight-4-interoperability-with.html

, but I am getting issue at this step..

dynamic lObjExcel = AutomationFactory.CreateObject("Excel.Application");

As "This operation is not supported in the current context."

Any ideas.
Thanks

推荐答案

也许如果您将这个问题留在文章自己的论坛中,则会得到作者的帮助.

要使其正常工作,您必须将应用程序设置为在浏览器外运行.你这样做了吗?

我在Google上找到了此链接:

http://10rem.net/blog/2010/04/14/scanning-an-image-from-silverlight-4-using-wia-automation [
Perhaps if you left this question in the article''s own forum, you''ll get help from the author.

To get this to work, you have to set the app to run out-of-browser. Did you do that?

I found this link on google:

http://10rem.net/blog/2010/04/14/scanning-an-image-from-silverlight-4-using-wia-automation[^]


请确保您拥有安装了Office的正确dll.
要执行此代码,将需要Office的一些文件.
Make sure you have right dll''s for Office installed.
Some files from Office will be a required for this code to execute.


此代码正确,但是除非您将silverlight项目属性设置为在浏览器中用完,否则该代码不起作用,我也有这个问题,因为我想在浏览器中运行该应用程序,所以有帮助吗?
This code is correct but not working unless you set your silverlight project property to run out of browser, I have this problem too, because i want to run the application in the browser, any help?


这篇关于当前上下文不支持此操作–Excel上传到Silverlight datagrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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