Sort ascending or Descending with out using tables

i want to sort a given column in ascending or descending order in an excel…
NOTE: what if my excel has no table??

how do you sort without tables??

Hi @shrganes,

Please refer the below link to sort.

If you want to check Column you need to read the sheet first , then only come to know table is available or not.
so better use Read Range activity the filter using select statement.
To check Column name is present in the table or not → dt.Columns.Contains(“col_name”)

if Sheet its self empty means need to read the cell before processing read range activity to check sheet is empty or not.
without data you cant sort

Regards,
Arivu

Thank you so much for your response…

I don’t need to filter… i want to SORT my data in ascending or descending order based on a column…
and i have data in my excel sheet (but no table created in my excel…)

Hi @shrganes,

if u have a data in excel sheet, use Sort table activity to sort the data.

Regards,
Arivu

Hey @shrganes

Refere the existing post:Uipath - Sort Datatable - #2 by alex.stoian

Regards…!!
Aksh

thank you :slight_smile:

what if my column name is not in a single line…
for example:
marks out of
(125)

Hello @arivu96

please go through the query , if excel don’t have the Table name, then how.

As per your answer we need Table name.

any one have alternate method or code