web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Extracting data from i...
Power Automate
Answered

Extracting data from individual web pages overwrites values instead of storing multiple records

(1) ShareShare
ReportReport
Posted on by 86

Hi everyone,

 

I’m currently working on a Power Automate Desktop (PAD) flow to extract data from a website and export it to Excel.

 

When I use the “Extract data from web page” action on a list or table view, PAD correctly recognizes the structure and outputs the data as a DataTable (multiple rows), which works perfectly.

 

However, when I try to extract data from individual detail pages (one record per page), I encounter an issue:

 

  • I open each record (e.g., account) one by one

  • Extract the required fields

  • Move to the next record

 

 

In this case, PAD seems to overwrite the values each time instead of storing them as separate rows. As a result, I only end up with the last record’s data.

 

I understand that this might be because PAD treats individual page extraction as single-value variables rather than a structured dataset.

 

My question is:

What is the best practice to handle this scenario and store each record properly (e.g., in Excel or a DataTable)?

I'm a beginner so step by step guide would really be appreciated.

I have the same question (0)
  • Verified answer
    Haque Profile Picture
    1,390 on at
     
    To handle extracting data from individual detail pages in PAD without overwriting previous records, you need to accumulate each record’s data into a collection or list rather than overwriting a single variable each time. 
     
    Here you is what you can do:
     
    1. Accumulate data in a DataTable variable during the loop.
    2. After the loop finishes, write the entire DataTable to Excel in one batch.
     
     

    Store  Data in a DataTable Variable

    Initialize DataTable Variable : Use the Create new DataTable action to create an empty DataTable with columns matching the fields you want to extract.

    Loop Through Records: Use a loop to open each detail page (e.g., each account record).

    Extract Fields:  Use the Extract data from web page action or UI automation to extract the required fields from the detail page. Store extracted fields in individual variables.

    Add Row to DataTable: Use the Add DataRow action to add a new row to the DataTable with the extracted field values.

    Navigate to Next Record: Use UI automation or web navigation actions to move to the next detail page.

    After Loop Completion: Use the Write to Excel worksheet action to export the entire DataTable to an Excel file.

     
    Please let me knwo if these tips help.
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
     
  • Suggested answer
    11manish Profile Picture
    781 on at
    In Power Automate Desktop, extracting data from detail pages returns single values, so each loop iteration overwrites previous data, leaving only the last record.
     
    Best Practice
    Store each record during the loop instead of overwriting:
     
     Use a DataTable (Recommended)
    • Create a DataTable
    • Add a new row for each record inside the loop
    • Export to Excel after the loop
     Or write directly to Excel
    • Maintain a row counter
    • Write each record to a new row
    Values are overwritten because they are not stored
    Solution is to accumulate data (DataTable or Excel) during the loop

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard