Table extraction doesn't work when trying to scrape multiple pages

Hi guys,

First post on here so apologies if I’m in the wrong place.

I am long term (but basic) user of UiPath for web scraping purposes. I have never had a problem, until over the last few weeks everytime I have attempted to scrape a website using Table Extraction, it does not always work.

Specifically, if just scraping on a single page it is fine. However, if I try to scrape across multiple pages, when I run the action it scrapes the first page, then opens up the Excel file which it is extracting to, stops scraping and then subsequently closes the Excel. I have no idea why it’s opening the document mid scrape and this appears to be part of the issue. Do you know how I could fix this? As mentioned, it seems to work fine if just scraping a single page.

Thank you in advance!

Hi @Luke2390,

Welcome to UiPath community!

Are you please able to show screenshot of your workflow?

Also, please share the selector being used for table extraction so we can help identify the problem.

Regards
Sonali

Hey @Luke2390
It looks like UiPath might be jumping to the Excel export right after scraping the first page, which would stop the rest of the pagination. This can happen if the Excel write step ends up inside the loop, or if it was added automatically by the Table Extraction wizard.

Hard to say for sure without seeing it - could you share a screenshot of your workflow?

Hi @Luke2390

Welcome to UiPath

Check pagination settings in the Table Extraction wizard.

Ensure the Next Page button selector is correct and stable.

Disable Auto Open Excel in Write Range or Append Range activities.

Verify that Excel activities run after data extraction, not during.

Add a small Delay before pagination to allow the page to load.

Check the Output panel for errors stopping the extraction.

Happy Automation

Hi @Luke2390 ,

Which version of UiPath are you using ?
Which activities are you using ?

Looks like ‘NextLinkSelector’ i.e. selector of the ‘Next’ button seems to be an issue.
Also check the value of ‘MaxNumberOfResults’. It has to be ‘0’ to extract all the values of the table. ( Please refer screenshot )

Hi @Luke2390

Please go through below link.

If you found helpful mark as a solution. Thanks

Hey Piotr,

Thank you very much for your response!

I’ve attached a screenshot of the workflow. Does that help? Let me know if you need any more detail.

Hey Sonali,

Thank you very much for your response!

I’ve attached a screenshot of the workflow. Does that help? Let me know if you need any more detail.

Hi Prashant,

How do I disable auto open excel? Seems like that could help.

Many thanks

Hi @Luke2390

Try this

  • Ensure Excel Application Scope has Visible set to False.
  • Use Append Range to add data without reopening the file.
  • Consider writing to CSV if you want to avoid Excel entirely.

Hi all,

Does anyone have any suggestions on how I might fix this? When I run the scraper it only does the first page because it opens up the Excel during the scraping process. I’m not very good with UiPath so any suggestions in simple terms would be incredibly appreciated.

Thanks for your help.

Thanks @prashant1603765,

How do I change Excel Application Scope from Visible to False?

Hi @Luke2390,

One question here..

Why have you considered putting your table extraction activity inside excel activity scope?

If you just doing the activities you are showing on the screen.

Then simply use those outside use excel scope to avoid interference.

Regards
Sonali

Hi @Luke2390 ,

@prashant1603765 meant ‘Keep excel file open’ property unchecked.

And for sure don’t keep the table extraction activity inside Excel Application scope. There is issue with sequencing in the snapshot that you have shared.

https://docs.uipath.com/activities/other/latest/ui-automation%22/table-extraction

1 Like

Hi Pavitra,

Thank you for your response :slight_smile:

Can you explain what my sequence should look like in that case? If I don’t include the table extraction in the Excel Application scope, then it doesn’t appear to let me extract the table to my specific Excel. What is the correct ordering?

One separate question - where do I go to uncheck the ‘keep excel file open’ property?

Apologies for the basic questions, I’m a very infrequent UiPath user.

Hi @Luke2390,

I understand that you want to do below:

  1. extract data from website
  2. write the extracted data to excel file

to do this, follow below:

  1. extract data and save the output to data table.
  2. After that use excel scope and use write range activity to write datatable into excel.

This should help.

Regards
Sonali

@Luke2390,

my bad, i just noticed that you are a studioX user.

So, you can refer below video on same:

Regards
Sonali

Hi Sonali,

I have followed the example above but I’m still faced with the same issue where my Excel opens during the process and it only scrapes the first page.

If you wouldn’t mind, please could you send me a screenshot of what the workflow should look like when data scraping into an Excel. I’m confused what it’s supposed to look like if my table exaction activity doesn’t sit inside the “Use Excel File” section.

Many thanks,
Luke

I followed the example and this is what the workflow looks like. What do I need to change?


The sequence is ideally - 1. Extract Table 2. Excel Application Scope 2.1 Use Excel File 2.1.1 Write Range