Paste datatable value to excel with formula - want to keep formula

Hi,
I am sorry if this question was already asked although I’ve searched.
This is probably an elementary excel - uipath question.
I know I should seach for alternative ways than what I wrote below,
but I would like to know if there is a way to realize this.

I would like to paste datatable A to excel A.

Datatable A only has values (doesn’t have formula).

Excel A has formulas.

I would like to keep formulas of Excel A when I paste datatable A over them.

So far,
when I tried pasting datatable A I could see Excel A formula disappears.

(Excel A already has old values before pasting datatable A.
I want to replace the values by pasting datatable A but keep the formulas.)

I tried read range and write range but didn’t work.
I also tried select range and send hotkey(paste only text: alt + h + v + t) but didn’t work too.

Thank you for reading.

Hi @yulko,

I had a similar issue - Below Is how I have handeled . Not sure if this is the correct approach.

  1. For Clearing only content and Not Formula - Have used uiAutomation.


– For TypeRange - I am Typing the range where Old data is there

image .

—Then - Clear and Clear Contents.

image

Once the data is cleared - I Save the File.

  1. For Pasting.

image

Basically - The bot Mimics the actions how a user performs


Mukesh

Hi, thank you very much for your fast, kind and helpful reply.
This might is an excel version difference’s problem, but
the excel I am using has Clear “value and formula” button
(the icon is the same as the picture you’ve pasted↑) but
doesn’t have the button for only deleting the value.
I think I will take a similar approach (cleaning the value first somehow).
Anyway thank you very much again.