I’m trying to automated calculation in Excel that is Mark Calculation. Anyone can present a suitable process for dynamically calculation row wise.
Actually, recently I completed individual process by hardcore in process task. Please check my excel and automation file…
My Expectation is -
B2+C2= Total Value
B3+C3= Total Value
B4+C4= Total Value… but how to dynamically not hard coded or fixed cell value.
You can try it as below.
- Read the entire excel file using workbook ReadRange → output would be dtExcelRead
- Take int i=2
- while i<=dtExcelRead.row.count
writeCell Activity → Range should be : “D”+i.ToString
→ Value should be : =sum(“B”+i.ToString+":"+“C”+i.ToString)
It will print the formula and generate the sum.
Hope this will work for you.
so you can enter formulas directly into excel
you can use a write cell activity and write directly into column D
firstly use read range to read datatable
then determine your last row intRows = (dt.Rows.Count)
In write cell you can write in formula:
in your range write:
@Deepak94… How to assign i=2, Can you show my project
Excel_Data_Save.zip (20.7 KB)
You can simply create a new int variable and name it as “i”.
then you have to assign i=2 before while loop.
You don’t need to loop @ARahman. Use write cell activity to pass the formula for one row (may be the second row) and then use auto fill range activity which will write the data in all the rows of the excel upto whatever rows you have data in excel
Hi @HareeshMR… Can you explain it more description. Or please correction in my workflow that i attached before.
Thanks @HareeshMR. The Problem has been Solved as follow your Steps.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.