我可以保存并另存为运行Web浏览器(C#)的excel吗?权限问题? [英] Can I Save and Saveas an excel running into a webbrowser (C#)? Permissions problems?
问题描述
当我们通过Open方法打开一个excel时,我们可以配置参数'readonly = false'和'editable = true'以允许使用Save和Saveas方法进行保存,从而避免出现消息";此位置已经存在一个名为"test.xls"的文件.您要替换它吗?"
问题是我没有如上所述打开Excel文件.我的应用程序(C#)在Windows窗体内的Web浏览器中收取excel的费用,因此我准备一个工作簿,然后在WebBrowser中打开它(使用Navigate方法,而不是Open方法),然后将WebBrowser文档分配给该应用程序,以便我可以继续来控制它
问题是:有什么方法可以在Web浏览器中以类似于Open方法的'readonly = false'和'editable = true'的权限打开此Excel文件? br/>
-如果没有,则保存功能将不起作用,并且仅当我更改Web浏览器的内容时(例如,当我执行mywebBrowser.Navigate("about:blank" , 错误的); ).此外,似乎在该位置已经存在消息名为'test.xls'的文件".您要替换它吗?"
-另一方面,如果无法完成,它将永远无法使用Saveas函数...
希望您提出任何建议!
Hi,
When we open an excel via the Open method we can configure the parameters 'readonly = false' and 'editable = true' to allow saving with Save and Saveas methods avoiding the messages "A file named 'test.xls' already exists in this location. Do you want to replace it?"
The problem is that I don't open the Excel file as above . My application (C#) charges the excel in a webbrowser inside a windows form so I prepere a workbook, I open it in the WebBrowser ( with Navigate method, not Open method) and then I assign the WebBrowser document to the application so I could continue to control it
The question is: Is there any way to open this Excel file in a webbrowser with permissions similar to 'readonly = false' and 'editable = true' of the Open method???
- If not, the Save function doesn't work and the saving only occurs when I change the content of the webbrowser ( for instance when I it's executed the line mywebBrowser.Navigate("about:blank", false); ). Moreover It appears the messege "A file named 'test.xls' already exists in this location. Do you want to replace it?"
- On the other way, if it can't be done, It`ll never works the Saveas function...
I'd appreciate any suggest!
推荐答案
这个问题在C#组中不会有太大的作用...尝试将其发布到 Office开发中的讨论或自动化讨论论坛论坛. br/>
This question won't get much action in the C# group...try posting it in the Discussions in Office Development or Discussions in Automation forum for interop questions.
这篇关于我可以保存并另存为运行Web浏览器(C#)的excel吗?权限问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!