Here I have a data table with 3 columns A,B,C. value of column C = value of A + value of B. how to set formula and need to write this data table to excel

Thanks for your answerâ€¦

But I need to write the formula in column C

just run the workflow it will write in Column C itself

I will attach a screenshot of what I expect

Here in C2 how it appears likewise I need in full cells in Column C

Just loop through the data table and use Write Cell to write the formula in column C.

Use counter to identify the row and place the correct formula in the target cell.

counter should be in the workflow scope and with 1 as the initial value.

**Output:**

- Kindly use write cell in C1 alone and write the formula c=A+B
- Then Read entire excel sheet and name as dt
- Copy the C1 Formula using copy activity
- use select Area activity it will be inside excel Application scope and put in the select area activity â€śC1:Câ€ť+dt.Rows.Count.Tostring .
- Now paste the value it will paste in the selected region and at last put saveworkbook activity and close it.

column value is a decimal number. I need to round the value to only 2 decimal points.

How to round the value inside the write cell?

use this function â€śmath.Round(decimalvalue,2)â€ť in linq to roun up all the decimal values in the column or you can loop and do .

Use this excel formula in the cell value. 2 is the decimal place. Change it to any number depending on the decimal place you need for the results.

â€ś=ROUNDâ€ť+"(A"+counter.ToString+"+B"+counter.ToString+",2)"

You can also useâ€¦

â€ś=TEXTâ€ť+"(A"+counter.ToString+"+B"+counter.ToString+",""##0.00"")"