Data scraping from website that data changes with time into an excel sheet

Hello everyone,
I want to use ui path scraping data activity to extract data from a website and fill an excel sheet
the web table keeps getting new data and some data might disappear at a time.
I want to update the excel with new data continuesly without deleting the disappearing data from the website.

Here is what I’ve built:
Open web browser
Data scraping (Create variable ExtractdataTable)
Write range activity from website in excel
Read Excel (Create variable ExtractdataTable)
If:
ExtractDataTable.AsEnumerable().Any(Function(y) String.Join(“”, y.ItemArray) = String.Join(“”, currentRow.ItemArray) AndAlso currentRow.Table Is ExcelDataTable)
True: Do nothing
Else: Add Data Row
currentRow.ItemArray in ExclDataTable

Can you please advise what o have done wrong and if there is any other way to do this?

Thanks!

if data changes time to time then you can put asterisk (*) in the selectors “aaname” please try on your side

Hi @Salma_Merhebi

After extracting the data from a page copy the entire data from strict selector and then paste that data into the fuzzy selector so that when ever a new data is visible on the page then that data will be extracted and always the excel is updated with the new data and also don’t forget to change the targeting method from strict to fuzzy as highlighted below.

Regards

Hi @vrdabberu
Thanks for your reply
Appreciate it!
Can you explain the steps in more details please?

Thanks

Thanks @prashant.v
Can you explain more please?

Thanks

Hi @Salma_Merhebi

Remove the data from Strict Selector and Paste that data to Fuzzy selector in the Targets section. Change the Targeting Methods from Strict Selector to Fuzzy Selector.

Regards

Hi @Salma_Merhebi

Copy the data from strict to fuzzy as shown below.

In the targeting methods shown below click the dropdown and then uncheck the strict selector and check the fuzzy selector as shown below.

Regards

I’ve done that
Do you mean the only activities I need are:
Open web browser
Data scraping with fuzzy selector property

Automatically any new data will be added to the excel sheet?

Thanks!

Hi @Salma_Merhebi

Okay I will give the workflow but you need to change the above mentioned changes in the extract data table activity

Regards

Thank you so much!
Appreciate it :slight_smile:

Hi @Salma_Merhebi

do you want to update the excel with new data by adding to the old data or else do you want to replace the entire data in an excel?

Regards

Just add new datat without deleting existing one.
Thanks!

1 Like

Hi @Salma_Merhebi

Try using the below workflow if you wanted to replace the new data with the old data in the same excel or else to write the new data to a new excel.

Try using the below workflow if you want to add the new data to the old data in the same excel.

Try the above steps but don’t forgot to change the above mentioned changes for the extract data table

Regards

After selecting the target point from where you want to extract data, you can open that selector and make changes in selector like passing asterisk or variable

And for append the content you can use “append range workbook” Activity

Thanks a lot.
I’ve tried it but it is not working :confused: