I have a sample inputs and attached here. I need to compute the duration column using the formula as IFERROR(DURATION(L2,K2,F2,H2,4,1),0) how to compute the operations in the excel without using the write cell activity. Please kindly suggest the workflow to complete the task.

–>Read the Excel file
Excel Application Scope
Read Range: Output to dtData

→ Compute Duration
Add a new column for duration
Assign: dtData.Columns.Add(“Duration”, GetType(Double))

For Each Row in dtData
Assign:
Dim calculatedDuration As Double
Try
'Assuming a function named DURATION is defined elsewhere
calculatedDuration = DURATION(CDate(row(“mtmdate”)), CDate(row(“MaturityDate”)), CDbl(row(“coupon”)), CDbl(row(“MTM yield”)), 4, 1)
Catch ex As Exception
calculatedDuration = 0
End Try

Stop here if you implemented a separate DURATION logic
row("Duration") = calculatedDuration

→ Write the Data Back to Excel
Write Range: dtData