AddOnsInc
asked on
VSTO Copy single worksheet to new workbook without customizations
I have a document-level Excel-based VSTO application written in VB.Net. I would like to take a single worksheet from this application and copy it over to a brand new workbook without any of the VSTO code. I have tried doing a SaveAs on the Activesheet to a specified name and that copies the worksheet to a new workbook with the customization but it is exceptionally slow. Even slower when I use the serverdocument.removecustm ization method.
What I would like to do is to create a new workbook and then copy my singel sheet over and then save it. If I use something similar to this:
Dim ws As Excel.Worksheet
ws = Globals.ThisWorkbook.Activ eSheet
ws.Copy()
I quickly get my sheet copied to a new workbook but I don't quite how to save it.
Thoughts and suggestions are appreciated.
What I would like to do is to create a new workbook and then copy my singel sheet over and then save it. If I use something similar to this:
Dim ws As Excel.Worksheet
ws = Globals.ThisWorkbook.Activ
ws.Copy()
I quickly get my sheet copied to a new workbook but I don't quite how to save it.
Thoughts and suggestions are appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.