View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bala Venkat Bala Venkat is offline
external usenet poster
 
Posts: 1
Default Copying worksheets across workbooks

Hi - I'm trying to copy a work sheet from a excel file to another excel file
using C#. The code I use is as follows:

---

((Microsoft.Office.Interop.Excel.Worksheet)(dataAp p.ActiveWorkbook.Sheets[1]
)).Copy( excelApp.ActiveWorkbook.Sheets[10],
System.Reflection.Missing.Value );

---

dataApp is the ExcelApplicationClass that I use to open the excel sheet that
has the data and excelApp has my target workbook.

I get the following error on Executing the code.

"Exception from HRESULT: 0x800A03EC"

Any help in this regard will be useful!

Thanks,

Bala