Excel : Copy Paste Range only Values

Hello All,

I just want to copy few columns from one sheet to another sheet in same excel, i’ve foud “Copy Paste Range” Activity but it is NOT working for ONLY values, if we use ALL it is copying forumlas too. I want to copy only values.

before posting this i’ve searched in forum, others have done in different ways (either macro / code/ with different activities) but not found solution with “Copy Paste Range”.
did anyone have any idea, please let me know.

Thanks in advance…

Best Regards,
Pradeep

1 Like

Hi @pradeepkintali

Have you tried using the read range activity to read the data of your columns. Once reading is done you can use write range to write it to the desired sheet.

Let know whether this works for you

4 Likes

Hi @Lahiru.Fernando,

Thanks for your time…

yes it is working with Read Range followed by Write Range. but NOT working with “Copy Paste Range” activity. do you have insights on “Copy Paste Range” activity

1 Like

Hi @pradeepkintali

Glad to know that by answer helped you to solve it… So what happens with the Copy Paste range is it will copy all of the content to the destination sheet. This includes the values as well as the formulas. That’s why you had that problem. To get the values, you always need to use the Read range as it takes the values of the excel…

So, if my answer helped you to figure it out, please also make sure to mark it as the solution too!! :slight_smile:

Thank you!!

Happy Automating!!

1 Like

Hello @Lahiru.Fernando ,

Good to know information from your reply. but in Copy Paste Range activity – > options → they have given dropdown as “value”,"All,“Formula”,“Cell format” when i have selected ALL it is copying all (including formulas,data) , lly selecting “Cell Format” means it is copying format too but while giving “VALUE” it is giving junk value for the columns which contians formula for data columns it is working…

once again thanks for your attention on my post.

4 Likes

@loginerror - Could you check once…

Issue is - COPY PASTE Range activity is not working properly to Paste only Values.

@pradeepkintali
Can you try with just Selecting ( Value, NumberFormat, CellFormat ) in theCopyItemsOptions of ExcelCopyPasteRange.

Hi Pradeep,

To get the columns you want and paste it in other datatable, I will suggest you can use filter datatable activity.
Using Read Range Activity just read the required datatable and save it in a datatable variable and then use filter datatable. In filter wizard navigate to the “Output Columns” and select Keep and with the name of the column or index of the Column you can get the required columns into the datatable and write that table into the sheet.

If required I can help you make the code of the same. Please DM if required

Cheers,
Sarthak Gulati

Yes @mukeshkala, issue is with while selecting “Value” option.

@sarthakgulati13 - i’ve done with read and write range activities but issue with COPY PASTE Range activity esplly for CopyPaste options selecting “value”.

I have same issue with COPY PASTE Range with VALUE. Need fix for this Activity. As a workaround, I have used Read and write range activities. But looks like “Copy Paste range” activity doesn’t serve the purpose at all when updating bulk records

1 Like

Hi @RPA_11,

I’m also facing the same issue with COPY Paste Range activity with option as “VALUE” . i also managed with read and write only. if i get to know any solution will paste here, please you also do the same.

@loginerror , @uipath , #UIPATH teams please check this issue once…

Thanks in advance…

Best Regards,
Pradeep

1 Like

@loginerror - Could you check this issue once…

Thanks in advance…

Hi @pradeepkintali

Could you explain your scenario? I tried with option set to All and Value and it seems to be working on the latest version of Studio and Excel activity package.

Could you give this project a try and see if it works for you?
CopyPasteRange.zip (8.1 KB)

1 Like

Hello @pradeepkintali, I happen to face the same problem and I think this is some issue, I think we should move this to Issue Category.

@loginerror please check the attached file to reproduce the issue. Suppose we need to copy values from Data Sheet to Format Sheet. Even when the copy setting is set to Value only, Copy and Paste Range Activity destroys the format.

CopyPasteRange_IssueReproduced.zip (10.9 KB)

Hi @whyyouandi

Thanks for the sample project, I reported the issue :slight_smile:

2 Likes

Thank you, @loginerror :slight_smile:

Hi,
I need to copy a single cell to the column for a specific range, i.e for example I need to copy the A6 cell and paste it to “A6:A20” range in same sheet.
Please guide me how to do it using “copy paste range” activity…

Hi, Did you try using AUTO FILL RANGE activity for applying a formula just for making the range of cells same as the top cell value…

Thanks

I strongly beleive this didn’t help, I have the same issue btw