How to sort a date in an excel column in descending order in blue prism
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
24-01-22 04:15 PM
Dear All,
I am new to Blue Prism. Kindly let me know how to sort a column in an excel containing different dates in descending order in Blue Prism
Thanks
------------------------------
Marina Dutta
------------------------------
I am new to Blue Prism. Kindly let me know how to sort a column in an excel containing different dates in descending order in Blue Prism
Thanks
------------------------------
Marina Dutta
------------------------------
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
24-01-22 04:55 PM
Hi Marina!
You need to "translate" the Excel into DataTable (C#). Then you can use a DataView(C#) to sort the data.
Code example:
DataView dv = ft.DefaultView;
dv.Sort = "occr desc";
DataTable sortedDT = dv.ToTable();
For the "translate"... Here you have a quick guide for instaling OLE DB on your Blue Prism environment. Then you can connect to your Excel like a database. Use this link to complete your connection string https://www.connectionstrings.com/excel/
If don't want to use code, you can create a Collection connection to your Excel like a database, and the you can use the "Utility - Collection Manipulation" and then choose "Sort Collection"
Hope this helps you.
Bye 🙂
------------------------------
Pablo Sarabia
Programmer
Altamira AM
------------------------------
You need to "translate" the Excel into DataTable (C#). Then you can use a DataView(C#) to sort the data.
Code example:
DataView dv = ft.DefaultView;
dv.Sort = "occr desc";
DataTable sortedDT = dv.ToTable();
For the "translate"... Here you have a quick guide for instaling OLE DB on your Blue Prism environment. Then you can connect to your Excel like a database. Use this link to complete your connection string https://www.connectionstrings.com/excel/
If don't want to use code, you can create a Collection connection to your Excel like a database, and the you can use the "Utility - Collection Manipulation" and then choose "Sort Collection"
Hope this helps you.
Bye 🙂
------------------------------
Pablo Sarabia
Programmer
Altamira AM
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-01-22 01:35 AM
Dear Pablo,
Thank You very much for your answer. What I am trying to do is I have an Excel file containing a column having dates and I want to get the latest date. Attached is the Excel file for your reference. From the Column which is containing dates I want to get the latest dates. Attached is the example of date excel file. Can I proceed with the collection Utility - Collection Manipulation" and then choose "Sort Collection" as you mentioned above. Can you guide me further as I am new to Blue Prism.
Thanks
Marina
------------------------------
Marina Dutta
------------------------------
Thank You very much for your answer. What I am trying to do is I have an Excel file containing a column having dates and I want to get the latest date. Attached is the Excel file for your reference. From the Column which is containing dates I want to get the latest dates. Attached is the example of date excel file. Can I proceed with the collection Utility - Collection Manipulation" and then choose "Sort Collection" as you mentioned above. Can you guide me further as I am new to Blue Prism.
Thanks
Marina
------------------------------
Marina Dutta
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-01-22 02:41 AM
Hi Pablo,
Can I read a single column of an Excel sheet in Blue Prism. My requirement is read single column in an excel sheet and not the entire column.
Thanks and Regards,
Marina
------------------------------
Marina Dutta
------------------------------
Can I read a single column of an Excel sheet in Blue Prism. My requirement is read single column in an excel sheet and not the entire column.
Thanks and Regards,
Marina
------------------------------
Marina Dutta
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-01-22 05:13 AM
Hi @Marina Dutta,
In Addition to @PabloSarabia , Yes you can read single column of an excel sheet in Blue Prism.
- Use MS Excel VBO with Get Worksheet Range as Collection action, where you can mention the Range of the required Column. By mentioning the start cell and end cell.
- Then you will the collection with the data.
-Then use Sort Collection action from Utility collection manipulation Business object .
Hope it helps you.
Thanks,
------------------------------
Srihari
RPA Developer
------------------------------
In Addition to @PabloSarabia , Yes you can read single column of an excel sheet in Blue Prism.
- Use MS Excel VBO with Get Worksheet Range as Collection action, where you can mention the Range of the required Column. By mentioning the start cell and end cell.
- Then you will the collection with the data.
-Then use Sort Collection action from Utility collection manipulation Business object .
Hope it helps you.
Thanks,
------------------------------
Srihari
RPA Developer
------------------------------
