Sorting data in Excel

Hi All,
@Palaniyappan @Lahiru.Fernando

1.Trying to add multiple condition for single column to remove the data but its not working(if I add one name for one column its working) - Filter Data Table Activity
Capture

  1. I want to sort the data in excel column from A to Z

  2. and i want to sort the Date from Old to New

Best Regards,
Naveen

2 Likes

@Naveen.Ch
In your first screenshot you showing a filterdefinition that cannot be fullfillled:
if column2= activated then it cannot be e.g. completed in the same time

not knowing all your requirements, but changing the AND conjunction setting to OR could help you to step out from this issue

1 Like

Hi

Use OR condition instead of AND in filter editor

Then for this

We can use SORT DATATABLE activity for this

And for this

Kindly have a view on this

Cheers @Naveen.Ch

1 Like

Hi @Naveen.Ch,

To sort the data , take a look this one.

Regards
Balamurugan.S

1 Like

Hi @Naveen.Ch

Check this

Dataview dv=new DataView(Dt)

Dv.Sort=“Column2,Column3,Column4 asc”

Thanks
Ashwin S

Thanks
Ashwin S

1 Like

Hi @Palaniyappan,

Thanks for quick response

Sort Data table is working only for one column
But i want to sort 3 columns in same sheet.

Best Regards,
Naveen

Hi @balupad14

Thanks for the response
I am not creating any table so how i can get the table name because the range is not will be same everytime

1 Like

Then we can use macro to do that
Or sort datatable activity one after the another in sequence
Cheers @

1 Like

Hi @Palaniyappan,

I have used sort data table one after another its not working

Best Regards,
Naveen

fine
then we can try with macro
@Naveen.Ch

1 Like

Hi @Palaniyappan,

Can you please help to create macro

I don’t know how to write macros

Best Regards
Naveen

that would be simple buddy
like open your excel manually and in that click on VIEW option and click on MACRO under which click on RECORD MACRO
–now do the sorting manually in the excel meanwhile that steps will be recorded in the background and will get converted into relevant VB Script
–once after performing the process of sorting in excel at the left bottom of the excel screen we can see a small black square box and on pressing that the macro recording will be stopped.

–now click again on MACRO and VIEW MACRO and EDIT option
–which will open the macro and copy that and paste it in a txt file
–now use a INVOKE VBA activity inside the EXCEL APPLICATION SCOPE and mention the filepath of that txt file as input and method name as well

Cheers @Naveen.Ch

2 Likes

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