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
}
精彩评论