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 / Copy Hyperlink along w...
Power Automate
Answered

Copy Hyperlink along with its text from Website to Excel

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have several hyperlinks like these from a website:

sdj04_0-1689389188288.png

 

I want to paste it in Excel as it is, without extracting the text and link separately.

I can do it manually by dragging that hyperlink from the website to the desired cell in Excel.

 

How can I achieve the same using Power Automate?

Insights would be very helpful, Thanks!

I have the same question (0)
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Use the Extract data from web page action, capture the elements with the hyperlink into a list, but when selecting what to extract, instead of "Own text" select the "href" atribute. This will return the hyperlinks into a list of values without the text itself.

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

    If you are interested in Power Automate, you might want to follow me on LinkedIn at https://www.linkedin.com/in/agnius-bartninkas/

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I guess I wasn't clear with my question.

     

    I want to paste the hyperlinked text as it is on an Excel Cell. In the image which I have attached the "1502149" is a hyperlinked text. I need to paste it in an Excel cell as "1502149" without losing its hyperlink.

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Im interested to know what right click , copy would do. If that could then be pasted in Excel. The problem with drag n drop is that it’s multiple steps and harder to target than clicking on elements. 

    through @Agnius method, you could extract “Own Text” and “href” separately. Then paste the text and add the hyperlink; again, lots of steps. 

    if you are able to right click copy and then paste from clipboard to a cell, that should only be 3 steps. Right now, every solution is dependent on you being able to capture those elements or iterate through them. 

    they look like they are in a table, but I don’t think you will get the hyperlinks if you “get data from web element”.  If the links are dynamic, it may be worth “get data” from the table and then use the column to iterate through and use the numbers to target the element(s). Then one of the 3 solutions above would be viable. 

    best of luck!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Only the link address can be copied with Right Click 

    sdj04_0-1689402096353.png

    But when I drag my mouse across the hyperlink and copy[CTRL + C], I can paste it on an Excel Cell:

    sdj04_1-1689402180319.png

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    The right way to do this would be to read both the text and the URLs via the Extract data from web page action and then use Run VBscript or Run PowerShell script to write the data into Excel while adding hyperlinks. 

     

    I would absolutely advise against using any keystrokes or mouse actions here.

     

    See this for reference on how to use VBscript to create a hyperlink in Excel: https://www.kombitz.com/2006/02/28/114115852332316734/?amp=1

    -------------------------------------------------------------------------

    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.

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I've found the solution and it was the most obvious one.

     

    Used Extract Data from web page to extract text and URL separately in a data table.

    Used Write to Excel Cell Action with value: =HYPERLINK("url", "text") in a for each loop iterating over the data table

     

    Thanks for the insights guys! Appreciate 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 468

#2
Haque Profile Picture

Haque 370

#3
Valantis Profile Picture

Valantis 354

Last 30 days Overall leaderboard