We have an Extract DataTable that selects a webpage and extracts it to a Excel spreadsheet. It is no longer working as intended. We just upgraded both Orchestrator and Studio to version 2021.10 so we suspect that it may be related.
A screenshot of the webpage is below along with what the Extract DataTable is selecting.
The issue is with the data underneath the column labeled STATUS because I can’t seem to trim and/or remove the date of 1/24/22. I just want the text Paid without the date.
This may sound simple, but my knowledge level is Beginner level. How or what do i need to do to remove the date of 1/24/22 from Cell C1 on my datatable spreadsheet?
If your field always contains the “Paid + Date”
I would indicate you to use the remove command, to remove everything that starts with index 4 that would be its space, thus the code:
“strStatus.Remove(4).ToString”
There are many ways to do this, but it all depends on the possible values. Assuming you don’t know what the word(s) will be, but it will always be just words/letters you want and not the numbers/special characters…regex will do that.
Output:
You’d have to For Each Row through the datatable and update each value.
You can use “For Each Row in Data Table” activity to loop through your data table and inside “For Each” you can use “IF” activity with the following condition.
Hi @gkamchen , Thank you for the message. I was able to use the remove command in other activities that helped solve some similar problems in other RPA projects. Thanks!
hi @postwick . I definitely agree with you that there are many ways to do this. I don’t think I’ve ever used Regex command before so I will give this a try. Thanks!
Hi @tainan.ramos . Thank you for suggestion of using “For Each Row in Data Table”. I ended up using this in another RPA project and it worked beautifully. Thanks!
Hi @ushu . Thank you for providing an example of using the “For Each Row in Data Table” and Regex command. It’s evident that there are many ways to do this. Thanks!