Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add method of "Sheets" class fails
Hi all,
I am trying to insert a worksheet from one excel workbook to another excel workbook. The source excel worksheet is of the size 102 MB. So opening the worksheets in the destination excel workbook and then copying is taking too much time. So I tried saving the source worksheet as an excel template (.xlt file) and then tried adding this template to the destination workbook with the following code : objExcel = New Excel.Application objBooks = objExcel.Workbooks ... objBooks.Open("D:\destExcel.xls") objBooks.Item(1).Sheets.Add( "D:\sourceExcel.xlt") .... The Sheets.Add method fails in the above piece of code. Does anybody know the reason ? I would also like to know if there is an efficient method of copying a large sized excel worksheet from one workbook to another without actually having to open the source worksheet. Thanks in anticipation, CodeKracker. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
"Select method of Range class failed" Error | Excel Discussion (Misc queries) | |||
XL2003 "paste method of worksheet class failed" | Excel Programming | |||
Error Message "Select method of worksheet class failed" | Excel Programming | |||
VBA error 1004 "Select method of Range class failed" | Excel Programming | |||
Error 1004, "select method of range class failed" | Excel Programming |