title: Excel Interop - Copy a filtered worksheet to a different Excel instance
body: <p>Suppose I have the following Excel Interop objects declared:</p>
  
  <pre><code>    Dim ExcelToKeepHidden As New Microsoft.Office.Interop.Excel.Application
      Dim SheetToCopy As Microsoft.Office.Interop.Excel.Workbook
      ...
      Dim ExcelToShow As New Microsoft.Office.Interop.Excel.Application
  </code></pre>
  
  <p>Basically, I'm keeping a hidden instance of Excel in the background (Which contains the sheet <code>SheetToCopy</code> - Where I keep doing all the nitty-gritty work away from the user's attention) and then, I have a button <strong>Show Excel Sheet</strong>, that, when the user clicks it, should take my <code>SheetToCopy</code> object and make a copy of it into the <code>ExcelToShow</code> application.</p>
  
  <p>In other words, the original <code>SheetToCopy</code> stays in the <code>ExcelToKeepHidden</code> application for further manipulation, but the <code>ExcelToShow</code> will show a copy of the sheet at the time the user clicks the button.</p>
  
  <p>So, my challenge is that I can't just use the <code>SheetToCopy.Copy()</code> method because the new sheet is in a completely different instance of Excel. Also, because of the kind of manipulations I'm doing, I can't just copy a range of cells because I've applied filters to it and so the <code>paste</code> functionality doesn't allow me to keep the formatting, etc.</p>
  
  <p>Basically, the only solution I'm seeing is to make a copy of the sheet into a new workbook <strong>in the same excel application</strong>, then close it and then re-open it in the second excel application, but I'm wondering if there's a better way to accomplish this??</p>
  
  <p>Any thoughts??  (VB or C# code are perfectly fine)</p>
  
  <p>Thanks!!!!)</p>