Convert string columns to numeric and sort datatable on this column

Hi everyone,

I have a excel file, i have to sort “price” column highest to lowest but the column is in Text format.
How to convert string to numeric of all columns…
my excel screenshot.

Thank you…

@saikumar
In case of the default activities as Sort Table, Sort DataTable are not working as expected giv a try on following:

  • read in excel with write range into a datattable (e.g. Variable: dtData)

  • assign activity:
    left side: dtSorted (Datatype: DataTable)
    right side:

    dtData.AsEnumerable.OrderByDescending(Function ( r ) CDbl(r(YourColNameOrIndex).toString.Trim)).CopyToDataTable

1 Like

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