Solved

VSTO Copy single worksheet to new workbook without customizations

Posted on 2010-11-17
1
1,321 Views
Last Modified: 2012-08-13
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.removecustmization 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.ActiveSheet
            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.
0
Comment
Question by:AddOnsInc
1 Comment
 

Accepted Solution

by:
AddOnsInc earned 0 total points
ID: 34161183
I guess I should have performed a few more searches because I found the perfect solution at http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/779c42b4-f298-4dbd-af3b-39784b04ae78

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now