Solved

VSTO Copy single worksheet to new workbook without customizations

Posted on 2010-11-17
1
1,314 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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

17 Experts available now in Live!

Get 1:1 Help Now