Excel - Sort


#1

Scenario: I have an excel file and it is completed formatted with various colors and patterns. The requirement is to sort the excel file based on a column.

I am aware I can read in data table, sort and write it into excel but then this method will remove all the formatting.

Steps to reproduce: As explained

Current Behavior:

Expected Behavior:

Studio/Robot/Orchestrator Version:

Last stable behavior:
Last stable version:
OS Version: Windows
Others if Relevant: (workflow, logs, .net version, service pack, etc):


#2

This is actually very simple. All you need to do is select the content of Excel file and insert a table. Note the name from design tab (you can change it too). Then use the “Sort Table” activity from excel in UiPath to sort you excel content.

PFA the excel file and Workflow .XAML wileformatted Table.xlsx (8.5 KB)
SortingFormattedTable.xaml (7.0 KB)


#3

Team,

Input excel file is a dynamic file from the customer end.

Scenario :

Customer vendor sends email to customer domain common id. Process has to read the email, store the attachment excel file, process steps on the attached email, save the excel file and send it to another email id.

As solution provided we have to manually define the table on the excel file and kick off the RPA process. I don’t think so it make any meaning.

  1. Can I define the table dynamically on the incoming excel file attachment ?

  2. Without table definition can we do the sorting ?

Hope you understand the requirements, please do the needful.

Thanks & Regards
Swaminathan Madurai Natarajan
Tata Consultancy Services Limited
Cell:- +18062836507
Mailto: swaminathan.natarajan@tcs.com
Website: http://www.tcs.com


#4

You can define a macro to sort and run it using Execute macro activity.


#5

You can also record the steps to manual create the table.

  1. Select all records.
  2. click insert table.
  3. extract the table name.
  4. then use that table name and column name to use the “sort table” activity.

#6

Vikas,

Appreciated your response, but then we cannot create or use macro. Because earlier the same process was automated using macro only. Again if provide macro as part of our solution then customer will lose hope on UIPath.

I tried ur second option on defining the table by record. Unfortunately I Couldn’t, can you provide sample ?

Thanks & Regards
Swaminathan Madurai Natarajan
Tata Consultancy Services Limited
Cell:- +18062836507
Mailto: swaminathan.natarajan@tcs.com
Website: http://www.tcs.com


#7

I was checking your project an I see that When I finished excel is not closed It is like if it was running in Background for this reason I need to kill the process in task manager to check if the sort was correct.

project