Opening a saved workbook causes the current workbook to throw exceptions

爱⌒轻易说出口 提交于 2019-12-05 06:47:09

I think this might be the correct behaviour.

If you were to manually start a new Excel session (which automatically creates a new workbook [Book1]) and then, without doing anything to Book1 open an existing workbook, you'll notice that Book1 no longer exists in the Excel session.

I'm guessing you're experiencing the same behaviour via your C# add-in.

This is the correct behavior as described by 'creamyegg'

Excel will discard the temporary workbook if it is not used. To get around this problem you just need to use the sheet before opening another.

Find an empty cell and modify it! Your workbook will remain and you can go about your business. :)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!