Re: Visual Studio Tools for Office MergeWorkbook does not work, SaveCopyAs works.......... ideas?
Saurabh.Gupta
Robert,
Appreciate your time, I am too far ahead in the project with the workaround, doing well.
For the benefit of forum users,
Background to the Problem:
1. I have a Workbook with VSTO Based code behind.
2. From the Workbook, I do a SaveAs to create a WorkBook backup devoid of the VSTO code behind. A plain simple workbook.
3.
At a later point of time, I may choose to include one of the backups(an oridnary .xls) in my workbook, by doing MergeWorkbook in the VSTO code-behind Workbook.
Problem:
Details in the mails above.
Alternative solution:
1. create an empty new workbook, copy worksheet by worksheet from the VSTO workbook to the regular empty workbook
2. To get back the workbook, do the same. Open the regualr workbook and copy sheets one after another to the WorkBook with VSTO code behind.
For further interest of the forum readers, I created an intresting VSTO based Excel solution.
My concept is - "Excel is the UI".
1. I use one Excel to manage, load, save to DB, backup & version to shared drive an assortment of different Excel Reports. Of course, there are more things.
2. There is code behind the Workbook only, the worksheets are regular worksheets pulled-in, backed-up etc.
3. Of course there is lot other stuff behind.
4. Why I did this - well if you have to cater to financial users, of 15 different departments and regions, who are Excel gurus & the same time, have data saved to DB, and well preserve all the weird other related data\charts etc, that they create in Excel. Well to add a sense of order to rather very dis-organized data management.
Folks, this is my last post to the topic, Thanks for your time.
The alternative posted here works neatly, except for a few lines of more code.