Well, that did not work for me, and that is why. The answer is still correct, but I want to clarify for future users.
I have a ListObject that I would like to store in an external workbook using VSTO. Creating a new worksheet and using SaveAs would rename the current Workbook, and so I would have to close the entire workbook to remove the setting.
What I had to do from the very beginning was:
Create a worksheet and fill out ListObject on this worksheet. Then use .Copy () without parameters to create a new book. How do I find a book now? I simply called Worksheet Now.Ticks.ToString () and searched for any open book using ActiveSheet.Name as Now.Ticks.ToString (). For this application, it should not be deeper than that. I saved this book and then closed it. Since the workbook was created using Copy, it had no settings and the problem was resolved.
source share