Solved

VSTO Copy single worksheet to new workbook without customizations

Posted on 2010-11-17
1
1,359 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Application Discovery Service in AWS

In the era of the cloud, customers migrating away from their existing on-premise infrastructure. This requires lots of planning, strategies, and effort to identify their existing resources and determine how best to migrate.  Datacenter migrations happen in four phases -

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

627 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