To update data in excel sheet

Hello, I am new to UiPath.
Can someone provide a solution for the following:

Excel sheet has data in Cell C1, C2 and C3
I need to
1)decrease the value in Cell C1 by one , updated value should be 10.
2)decrease the value in Cell C2 by one, updated value should be 9.
3)value in Cell C3 = C1-C2 , need to use the updated values of C1 and C2 from #1 and #2 above.

I used read range activity to get the data into a data table.
not sure how to perform the data manipulation in the data table to update the values.
update c1-c3

appreciate any help.

Hi @rajap

Welcome to the UiPath Community

While reading the excel file what is the range that you have provided, or how many cols are there in your data table variable.

If there are 3 cols in your data table variable, then-

  1. inputDT.Rows(0).item(2) = CInt(inputDT.Rows(0).item(2))-1

  2. inputDT.Rows(1).item(2) = CInt(inputDT.Rows(1).item(2))-1

  3. inputDT.Rows(2).item(2) = CInt(inputDT.Rows(1).item(2))-CInt(inputDT.Rows(0).item(2))

@rajap

Welcome to forums

Check below for your reference

Hope this may help you

Thanks