Excel Manipulation Problem

I have to find out the average of the column named close price containing decimal values like 16.11 from excel and then write it to another excel file. Please help me do this. I am facing type conversion error continuously.


Welcome to our UiPath community.

Please try below expression to find out the average of the column.

dtInput.AsEnumerable().Average(Function(row) cDbl(row("Columnname").ToString.Trim))

Here, dtInput is variable of type DataTable and it holds your input data.

@lakshman Thankyou so much it worked.

Can you please provide me same average finding expression for coulmn G named Volumn


dtInput.AsEnumerable().Average(Function(row) CInt(row("Volume").ToString.Trim))

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.