I want to perform mathematical operation with excel file

I want to perform mathematical operation with excel file And in that input file some value is invalid instead of number value there is alphabetical letter and some values are empty so how to Handel this exception and share me YouTube vedio for this I have searched but it’s only normal process I want with exception.

Hi @pallavi_patil2

First filter out the data in excel with numbers, for that filtered data do the mathematical operations.

If you want to filter the data with numbers in a specific column follow the below approach with LINQ expressions,
→ Use the read range workbook activity to read the excel and store in a datatable called dt.
→ Take an assign activity and give the below linq expression,

- Assign -> filteredDt = dt.AsEnumerable().Where(Function(row) IsNumeric(row("ColumnName").ToString())).CopyToDataTable()

→ Then use the write range workbook activity to write the filteredDt to the excel and proceed for the mathematical operations.

Hope it helps!!

@pallavi_patil2


Not String.IsNullOrEmpty(CurrentRow("Col").ToString) And CurrentRow("Col").ToString.IsNumeric

In your FilteredDt you got the rows which does not contain empty and and only numeric data in this datatable.

Hope this helps you

Thanks for the solution ,

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