Hello, I have two workbooks, WB1.xls and WB2.xls and
I would like to copy the worksheet from the first workbook to the first sheet on the second workbook in VB.net
I could copy from one worksheet to another worksheet on the same workbook, but if I execute the code above in which I am copying one workbook to another different workbook, I get an error saying "Copy method of Worksheet class failed."
I would like to copy from tempExcel workbook, worksheet 1 to oExcel workbook, worksheet 1.
Did the both workbooks are opened. Open them in code and then try to copy the sheets. The name of excel file is't relative path to the file, it is the name of active workbook.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.