开发者

How to make Excel add-in debugger launch with specific file?

开发者 https://www.devze.com 2023-03-07 22:45 出处:网络
I have Excel add-in project, and I need to make it open specific Excel file when I run debug. Ideas开发者_运维技巧?I haven\'t tested it but adding the following code to Startup event should do it:

I have Excel add-in project, and I need to make it open specific Excel file when I run debug. Ideas开发者_运维技巧?


I haven't tested it but adding the following code to Startup event should do it:

private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
    #if DEBUG
        this.Application.Workbooks.Open(@"C:\file.xlsx");
    #endif
}
0

精彩评论

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