Opening a saved workbook causes the current workbook to throw exceptions
问题 I'm trying to open a save Excel workbook while keeping a reference to the current workbook. The issue is that as soon as I open the saved workbook, the original throws an exception upon access. Here's a code snippet to demonstrate. I put this in an event handler for a ribbon button to test it. try { string workbookPath = @"C:\Temp\Test.xlsx"; Workbook current = Globals.ThisAddIn.Application.ActiveWorkbook; Workbook newWorkbook = Globals.ThisAddIn.Application.Workbooks.Open(workbookPath);