Removing the first numbers in a string

Ok @ClaytonM thanks for the clarification.
The data has thousands of rows so it may not the efficient solution to loop over the entire dataset. Is there a way to remove the comma as soon as is scraped from the website?

For instance, another web scraper named Parsehub, give the possibility to insert a Regex command when the string is scraped in order to remove the comma or the currency… which is more efficient instead of re-processing all the database afterwards…

Have you got my point?

Regards

If you are using Extract Structured Data activity to scrape the dataset, then as far as I know, you can’t change the values during that step. But I’m not saying it’s not possible either, and have not seen it.

You can also use other script files to process your data which may be faster. However, I can’t say I’m an expert on doing this with DataTables. There are Python, Powershell, and VBA activities in UiPath, which you can use for this.

One solution you might consider is using Excel Write Range to output your data to Excel rather than CSV, then if you prefer it to be CSV, use the Save As dialogue to generate the CSV file. This would remove any need to fix the delimiting because Excel would do it for you.

Regards.

1 Like

Also keep in mind that “thousands of rows” isn’t very much. It would likely take 1-2 seconds max to loop through 999,999 rows if you’re just doing the if statement and replacing the comma. If you’re doing it a few million times then I’d spend more time on making efficient code. Otherwise it’s less efficient trying to optimize every little bit :slight_smile:

1 Like

That is a great advice, using the Excel writer instead csv I overcome all problem related to the comma.

Thanks a lot guys for the support!

Regards

1 Like

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