开发者

.net VSTO save excel file and share on a server

I have a requirement at job to produce an Excel file and then to put it on a shared folder so managers can take a copy and consult it.

I have been using VSTO to develop a part on my application.

When I execute this application, the excel file pops up and everything is populated properly.

If I save a local copy of the document on my desktop and I open it again, I receive error saying VSTO could not be downloaded.

Is there a way to:

1.execute the application 2. save a local copy on my desktop 3. use this file as a normal excel file

from an Excel Workbook application in visual studio 2010.

Please ask any question if I am not clear, it's the first time I use VSTO and some of开发者_StackOverflow中文版 it is still unclear to me.

Thank you.


I found the answer to my problem.

Here's where I found it: http://gluegood.blogspot.com/2010/07/namecode-classc-sharp.html

Simply Add "RemoveCustomization" at the end of the startup method.

private void ThisWorkbook_Startup(object sender, System.EventArgs e)
    {
        [ code removed for clarity ]

        this.RemoveCustomization();
    }

This removes every customizations you made on your application. This allows you to execute your application, save a local copy on your desktop, and open without the need to install or deploy anything.

Thank you.


I Believe you should document yourself better about VSTO deployment issues.

There were somne changes between version 2007 and version 2010 to help and simplify deployment with ClickOnce, check on MSDN.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜