How to sum the data in the row and put the sum in another excel

hi, I am having the problem like this
expense date date date
11/02/2018 12/08/2018 13/08/2018
breakfast: 100 100 100
dinner 500 500 500 .

in excel the data is like this .
i need to individual row sum the indivual expense and store it into another expense like .

name : breakfast dinner
akshay 300 1500.

which is the easy way to do this . i have done this by reading cell and adding the value of sum into another variable and then writing the value to another excel . but it will take more time for this .can any one please give the easy solution for this .

1 Like

@akshaygm12 if you want write result in same sheet it will be easy, u want that method?

i want to write the sum into another excel sheet .

Have you gone through the UiPath training video regarding the excel activities? If not, you can go through it once to get a better understanding of using excel with UiPath.

As for this question, I’ll save you the time.

  1. Use “Build Datatable” activity with the columns you need–name, breakfast, dinner.
  2. From the input excel sheet, find the cell from where you need the table. Let’s say the “breakfast” row starts at A3. Use Excel Application scope and use the “read range” activity to fetch both the rows you need ie ‘breakfast’ and ‘dinner’ as a datatable.
  3. Use for each data row to take the sum of the row values.
  4. Use Add data row with the datatable you built earlier.

ok thanks :slight_smile:

Try it yourself first. If you’re not able to, let me know. I’ll create a workflow and share it with you.

1 Like

siddharth,
even if will be able to do it…it will be nice to have on the forum some example for somebody who will find solution in the future.

True. So here you go. Let me know if you have any queries.

SumDataInRow.zip (9.1 KB)

5 Likes

thanks siddarth its working .

siddharth, thank you!

1 Like