Issue in copying the excel sheet

While copying the sheet I am getting the following error:


how to rectify it?
TIA

@Cuberoot

Can you show what youa re trying to do and which activities youa re using?

When you move merged cells and the range is less then this error would appear.are you trying to paste the data into merged cells on excel?

Cheers

Simply I am copying one spreadsheet from excel file and copy it into a new file.It has 81 sheets in first sheet it has above error, how to rectify it?
Can we use vb code for this?

Hi @Cuberoot ,

Could you let us know if you are using Activities here to perform the Copy or Are you trying to copy a sheet manually ?

Hi @Cuberoot ,

Please take a look on this. It will help to solve your issue.

Regards
Balamurugan.S

but I can’t use balareva activity

Excel.CopySheet activity

@Cuberoot

Can you try using copy/paste range instead from the modern activities

If needed vba then try this

can help if you have issues building vba

cheers

I have tried copy activity
image

@Cuberoot

please try the alternate activity or the vba …and i would as well check on merged cells …ideally should be copied as is…but vba or the copy range might help

Cheers

@Cuberoot ,

Could you also maybe show us the properties of the Copy Sheet Activity ? As mentioned in your previous posts, we assume you are trying to copy multiple sheets. Just to ensure the counter or name of the sheet is handled, we would also want to check it’s properties.
image

Yes, you are right I have to copy 80 sheets

image

How to use vba and copy range activity. If I want the data of whole sheet, then how to use copy range activity? I want to create a new sheet
TIA

As per the excel forum it seems we can’t copy excel merged row sheets,
please check the below link for alternative solution
"we can't do that to a merged cell" - how to turn off this warning? [SOLVED]

@Cuberoot

In the link I provided earlier there is a vba to copy sheet from one excel to another…Just copy that paste it in notepad and save the file as .vba…Then use invoke vba to invoke it

Function CopySheetToClosedWB(DestinationPath as String,SheetNameInput as SheetName)
Application.ScreenUpdating = False

    Set OpenBook = ActiveWorkbook.Sheets(SheetNameInput)
    Set closedBook = Workbooks.Open(DestinationPath)
    OpenBook.Copy Before:=closedBook.Sheets(1)
    closedBook.Close SaveChanges:=True

Application.ScreenUpdating = True
End Function

cheers