Copy and paste sheet in the same excel file with new name after/before a particular sheet

@ALL

Hello guys,
I have an excel file in that, I have various sheets. And I want to copy the a particular sheet and paste that sheet with previous values in the new sheet also but with a different name.

Example: Suppose their is a sheet name Oct 2019 and I want to copy this sheet and create same sheet with new name Nov 2019.

Manual Steps : Ctrl + Left Mouse Click and Hold and drag to the Right.

I am not sure how to do this using UiPath.

Please check the images below for better under standing:

Highlighted part needs to be named as Nov 2019

@Palaniyappan
@ImPratham45

Please guys if you are able to help. That will be very helpful.

Thanks in Advance.
Aryan

In excel application scope
You can use read range and then using write range name the sheet as you want and datatable will be output of Read range

3 Likes

@ImPratham45

I want to confirm one thing, all the formats and every thing else will be the same?

Like formulae and all?

I have not tried it this way!

Thanks
Aryan

1 Like

Yah
Use Read range activity where mention the particular sheetname we want to get extracted with data and get the output with a variable of type datatable named dt
—now use WRITE RANGE activity and mention the sheetname we want and range as “” with ADD HEADERS property enabled and pass the variable dt as input
This will right that datatable to this new sheet

Cheers @AryanSingh

1 Like

@Palaniyappan
@ImPratham45

thanks guys.

Regards

Aryan

1 Like

Yah format can be retained but formula won’t be retained, only the values will be retained
But if we want the formula to be retained we can use hot keys like ctrl+ c and ctrl+v and other key combinations for creating a new sheet and naming it
That would work either

Cheers @AryanSingh

1 Like

Formulas will not be copied if you use write range

1 Like

@Palaniyappan
@ImPratham45

Ok, so how can I do that manual process things, because if start writing formulae and other variable things, the efficiency and speed will be very slow!

This one::

Manual Steps : Ctrl + Left Mouse Click and Hold and drag to the Right.

Please guide me regarding this!
Should I do the manual steps through the bot, if possible?

Regards
Aryan

No no buddy
Use hot key as ctrl+g and type as A1 with type into activity
Then another send hot key with ctrl+a
And another mine with ctrl+c

Then a hot key create a new sheet and paste it with ctrl+v hot key
Cheers @AryanSingh

1 Like

If the previous posts have not provided a solution, you can try this link.

1 Like

@Palaniyappan
@erkanceylan

Ok. Let me try.

Thanks
Cheers

1 Like

@Palaniyappan

I think I have found way. using hotkeys, Let me try and will update you guys!

Thanks for all the help.
Few minutes will be back.

Thanks
Aryan

1 Like

Sure
@AryanSingh

@Palaniyappan
@erkanceylan
@ImPratham45

Hey guys, I have found a work around using Hotkeys, I think it should work.

For creating same copy of the sheet:

Alt + E,M [E and M should be pressed one by one]

Next/Previous sheet shortcut if needed

Ctrl + Page down/up

For Renaming the sheet

Alt + H,O,R [H,O,R pressed one after the other]

Thanks guys.

Cheers
Aryan

3 Likes

Awesome @AryanSingh

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.