How to sum up until current row?

Dear Developers, i have a question regarding Excel where i have to get to sum up until until current row in column A and populate that in column B. sample as per below

image

image

i have to sum up to current row in column A and populate that in column. i believe we can use write cell and =sum(current cell:Beginning cell) to get the sum… but is there a faster way since there will be lots of rows involved

Build datatable - 1 column - dtSum

Read range - dtData

Assign Activity
dtSum =

(From i in Enumerable.Range(1, dtData.Rows.Count)
Let s = dtData.AsEnumerable().Take(i).Sum(Function (x) CInt(x("Column1").toString.Trim))
Select ra = new Object(){s}
Select r = dtSum.Rows.Add(ra)).CopyToDataTable 

Write range - dtSum - use Range Offset e.g B1

Hi @yusuf

Please find the below workflow and required output as per your requirement.

Sequence1.xaml (8.5 KB)
Input’.xlsx (7.8 KB)

Hope it works!!

Hi @yusuf

Please find the below xaml

Electricity Task_Excel.zip (167.7 KB)

Regards,