C# - how do I copy Excel Worksheet from one Workbook to another?

Hi all-

Does anyone have C# code that copies an Excel worksheet from one workbook to another?  I'm using Office 2003 and Visual Studio 2005.  I have VSTO 2005 SE installed and am interested in using the Microsoft.Office.Tools.Excel object instead of the convoluted Excel Interop object.  I've been trying to get some VBA examples that I see on the 'net to work (obviously not using VSTO), but can't get that to work, nor anything I try with VSTO.

Thanks much!
Who is Participating?
Miguel OzSoftware EngineerCommented:
The comment is self explanatory and provide the correct answer.
The C# code translation of my answer is available here:

Miguel OzSoftware EngineerCommented:

This code is VB.net 2008, but it will work for you as the code uses the same method signatures(Office 2003/2007 are the same in this area, just make sure to include the appropiate reference Microsoft.Office.Tools.Excel (11))

Translate this code to C# is very easy, I can do it if you like
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.