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

Community site session details

Session Id : Znn++EB4+mRVMd8UHWiUdP
Power Automate - Power Automate Desktop
Answered

Extract data from webpage table within IFRAMES using JS

Like (0) ShareShare
ReportReport
Posted on 27 Sep 2023 21:25:05 by 200

Hello Everyone,

 

I am new to PAD and JS. I am scraping information from multiple webpages with identical table layouts. The table is within an IFRAME and because of that when I use the "Extract Data from Webpage" action I can set the table up correctly but I cannot run the action because I receive the error "Export Data can't be found". I believe this is because the data is not on the webpage but instead in the IFRAME.

 

I can take the URL from the IFRAME and open that URL directly for each webpage by running through Client IDs.  My URL for the IFRAMEs is this: 

https://my.epitomax.net//epitomax/episode/AllForms.jsp?episode_id=%ClientID%&MAX_ROWS_OVERRIDE=FALSE&ALLFORM_DEFAULT_FORM_TYPE_FILTER='TREATMENT PLAN','PROGRESS NOTE','MISCELLANEOUS','DISCHARGE SUMMARY','ASSESSMENT'

 

When inspecting the table on each website I see they all have "div id = 'myGrid'". Is there a way to use JavaScript to extract all this table data into a data table on PAD? I need the code to work so that I can run through any webpage with the same generic URL and a new Client ID. 

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on 29 Sep 2023 at 18:38:15
    Re: Extract data from webpage table within IFRAMES using JS

    You can also use a Wait for web page content action to wait for an element or text to appear. Then you will not need to have a hardcoded wait. It is usually more efficient this way.

  • apaulso9 Profile Picture
    200 on 28 Sep 2023 at 16:04:59
    Re: Extract data from webpage table within IFRAMES using JS

    My "Extract Data" action was running before all the data loaded. I added a "Wait" action and it started working again!

  • apaulso9 Profile Picture
    200 on 28 Sep 2023 at 13:54:52
    Re: Extract data from webpage table within IFRAMES using JS

    Hello,

     

    Thanks for the update about JS. Is there a way to tell it to return the string of the values inside the element labeled "myGrid"? As for extracting from the URL behind the IFRAME is still returns the error "Data Extraction Element not found".

     

    Are there other ways you know of to remedy this problem?

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on 28 Sep 2023 at 11:38:07
    Re: Extract data from webpage table within IFRAMES using JS

    A JS function will never return a table for you. It is always designed to return a string. You will then need to use various processing afterwards in native PAD actions to convert it to a table.

     

    If you can actually open the direct URL behind the iframe, I would suggest opening that web page and using Extract data from web page on it. If the structure of the tables is the same, you should be perfectly fine with it.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete