Paste an excel sheet with the same format

Hello Family,
Can you please help me solve this problem, i have to copy and paste an excel sheet in another one guarding the same style and format, it doesn’t work with hotkeys : Ctr+C , Ctrl+V neither with click copy + click paste .
thanks

1 Like

@hzarriq

Welcome to the Community!!!

Use Copy To File activity to copy the work sheet to an another excel file. If the another file doesn’t exist, you can set the property “Auto File Creation” = true. It creates the file automatically and copies the worksheet.

1 Like

try this

1 Like

hello, i don’t want to copy the whole file , i want to paste one of the sheets of the excel file.
Copy file copy all sheets

@hzarriq
This Copy to File activity is customised activity and you can copy the excel sheet to another file.

If you’re not able to find this in studio, please refer to below post for an alternative:

https://activities.uipath.com/docs/excel-copy-sheet

1 Like

You can also Use VBA OR Macro to copy the entire sheet with its format in same workbook or in another workbook.

ActiveSheet.Copy After:=Workbooks('Book1.xlsx").Sheets(Workbooks(“Book1.xlsx”).Worksheets.Count)

1 Like

it wouldn’t work with an existing file, il copies in a new excel file, it may be because of excel version
Error message :
Main has thrown an exception
Source: Copy Sheet
Message: That name is already taken. Try a different one.
Exception Type: COMException