I have an Excel which contains some Currency Rate data & I have some data into multiple variables and enter the data into “Exchange rate” column of Below Excel,
Please help me How we can do that ?
I have an Excel which contains some Currency Rate data & I have some data into multiple variables and enter the data into “Exchange rate” column of Below Excel,
Please help me How we can do that ?
You can use Vlookup activity to find the Cell row and then use write cell activity to replace that specific value in excel
Read Range
activity to read the data from the Excel file into a DataTable variable.CurrencyRateVariable
), use the For Each Row
activity to loop through each row of the DataTable.Assign
activity to update the “Exchange rate” column in the current row of the DataTable.row("Exchange rate") = CurrencyRateVariable
Write Excel Data: After updating the DataTable, use the Write Range
activity to write the updated DataTable back to the Excel file.
or
in one line of code:
dt.AsEnumerable().ToList().ForEach(Sub(row) row("Exchange rate") = CurrencyRateVariable)
cheers…!.
By using for each row in Data Table, it is updating same value in every row of Exchange Rate column.
But I have separate value for each currency in string variable and I have to update it with new values. how we can do that ?
its better to make all the variables values into an array
and use for each row in datatable activity and create output as index for that activity
inside use
assign activity
currentRow(“ColumnName”)=arrar(index)
outside of for each row in datatable use write range activity
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.