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 / How to extract from th...
Power Automate
Unanswered

How to extract from this site?

(0) ShareShare
ReportReport
Posted on by 124

Hi,

 

Im struggling to extract the data from the following website: https://www.takeover.ch/transactions/current

All I want is the 2 highlighted items in the screenshot below, basically if something appears in the offer section I want to pull out the offeror and offeree.  The current workflow I have accesses a number of similer sites but they all seem to have HTML tables, I dont think this site is an HTML table.

Craigja_0-1633438605217.png

 

I have the same question (0)
  • Craigja Profile Picture
    124 on at

    I have this so far:

    Craigja_1-1633439301557.png

    which creates textlist2,

    text list 2 has:

    Craigja_2-1633439366939.png

     

    But then what?  I think I need loop round each item, check if its blank?

  • Karlis Profile Picture
    23 on at

    Hi Craig

     

    I am not sure if this is the best practice but I would suggest playing around with the some of the UI automation actions. I managed to get the two values by the following process:

     

    Karlis_0-1633440048516.png

     

    In order to set this up, I set an If function to find an "Offer" image (set-up in the images panel) and then looking for the name details of an UI element (set under the UI element panel):

     

    Karlis_1-1633440195696.png

     

    You have to specify which details of the UI element you want to extract by going into "Edit selector"

    The final selector builder would look something like this:

     

    For the Title:

    > document[Class="Chrome_RenderWidgetHostHWND"] > group:eq(2) > document[Id="transaction876"] > hyperlink[Name@=""] > text[Name@=""]

     

    For the Offeror:

     > document[Class="Chrome_RenderWidgetHostHWND"] > group:eq(2) > document[Id="transaction876"] > text:eq(3)

  • Craigja Profile Picture
    124 on at

    and would the above work if the offeror and offeree were different?  There may also be more than 1 record so I need to loop.

    Ive not used the image before, I just have it in a table

  • Karlis Profile Picture
    23 on at

    No, this would not work for the loop. I was trying to find a UI element that would list all the documents on this page but I couldn't quite see how. 

  • Craigja Profile Picture
    124 on at

    yep, thats my problem - I can grab the text but cant figure out how to only extract what I need from it!

  • Craigja Profile Picture
    124 on at

    So I can get to this stage with a table, but no idea how I can get out of the table only what Im interested in which is:

    Cassiopea S.p.A. & Cosmo Pharmaceuticals N.V. Irland

     

    Would welcome any other ideas as Im pretty much stumped at the moment!

    Craigja_0-1633445009506.png

     

     

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    If the information you want will always be in the 3rd (#2) and 4th (#3) row, then you write:

    Set Variable %Offeree% to %TextList2[2]%

    Replace Text " (2021)" in %Offeree% to %Offeree%

    Set Variable %Offeror% to %TextList2[3]%

    Replace Text "Offeror: " in %Offeror% to %Offeror%

  • Craigja Profile Picture
    124 on at

    Not quite that simple either - when you look at the webpage, I want the Offer section, and this could be one or more 'rows' of data.    So I think I need to try and turn the single column TextList2 into multiple columns, pivot it somehow....  if the row is pure numbers that signifies a new record:

    Ignore row 1, easy to do, row text is not 'Offer'

    row 2 is numbers only so a new 'record'

     

    0796   Cassiopea S.p.A. (2021)Offeror: Cosmo Pharmaceuticals N.V. IrlandVoluntry OfferOffer initially friendlyExchange offer

     

    Then I would 'end' the table when the next record says 'Obligation to make an offer (existence/exemptions)'

    If I could get to this, it would just be a case of taking the data in Columns 2 & 3 for every record in the table

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    I have a workaround...not sure if you are going to like it.  Some of the syntax is missing below, but the logic will work.

     

    Put %TextList2% into Excel, and write yourself a VBA that looks through this:

    • Dim i As Long #1st row number of current section
    • Dim s As Long #section number
    • i = 1
    • s = 1
    • Do
      • #If Range("A:" & i).value is between 0000 and 9999 Then
        • #write Range("A:" & i +1) to Sheet2 Range ("A" & s) 'this gets the offeree
        • #Replace text " (2021) on Sheet2 Range ("A" & s) 'this removes the year from the offeree
        • #write Range("A:" & i + 2) to Sheet2 Range ("B" & s) 'this gets the offeror
        • #Replace text "Offeror: " on Sheet2 Range ("B" & s) 'this removes unneeded text from the offeror
        • s = s + 1 'declare a new section so the next offer goes into the next row on Sheet2
      • ExitIF
      • If Range("A:" & i).value = "Obligation to make an offer (existence/exemptions)"
        • Exit Loop
      • ExitIF
    • i = i+1 'next row
    • Loop Until 1=2 'we only want the loop to end on the 2nd IF, so we make something impossible here.

     

    If you write this VBA, you will get all the information you are looking for listed out in a table on Sheet2.

     

    Best of Luck!

     

  • Craigja Profile Picture
    124 on at

    I was suspecting this coudnt be done in PAD and something like an excel macro was needed!  Ive never written any VBA and have no idea how to even start!  I think Im gonna need to call in the contract company that did the rest of the flow and see if they can help!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 248 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 204

#3
Haque Profile Picture

Haque 179

Last 30 days Overall leaderboard