Skip to main content

Notifications

Community site session details

Community site session details

Session Id : v85b2IRYw7MG9uwu97htlh
Power Automate - Building Flows
Unanswered

Extract the Hyperlink from an cell in Excel

Like (0) ShareShare
ReportReport
Posted on 9 Aug 2023 14:55:57 by

Hi

 

I need to include the hyperlink of an excel cell into an email using flow. If I use the excel field, Flow just gives me the value of the cell, but not the hyperlink itself. On the example below, Flow gives me the string "Link" and what I need is the hyperlink within

 

ezequiel_1-1691592882249.png

Any help on solve this?

 

Thanks

 

Ezequiel

 

  • rzaneti Profile Picture
    4,073 Super User 2025 Season 1 on 09 Aug 2023 at 15:53:49
    Re: Extract the Hyperlink from an cell in Excel

    Hi @ezequiel ,

     

    An alternative is to use Office Scripts. Excel ranges allow a method called getHyperlink(), that returns an object which 'address' property is the hyperlink that you are looking for. Check the example below (the link assigned to cell B2 is 'www.google.com', and it is returned in the console, highlighted in yellow):

    rzaneti_0-1691595973076.png

     

    The code used to get access to the hyperlink object from cell B2 was: workbook.getWorksheet('Sheet1').getCell(1, 1,).getHyperlink(), and I assigned it to the 'cell_link' variable (line 2). In line 4, I'm displaying the property 'address' in the console. The 'getCell()' method is accessing the cell based on its row/column position (it is zero-indexed, so I had to use '1' to access the cell at 2nd row and 2nd column).  

     

    You can retrieve it to Power Automate by using the 'Run script' action from Excel connector. You can replicate the same code from above and just insert a return cell_link in line 5.  

     

    I recommend you to read these articles from Microsoft about the Office Scripts and its integration with Power Automate:

    https://learn.microsoft.com/en-us/office/dev/scripts/overview/excel 

    https://learn.microsoft.com/en-us/office/dev/scripts/develop/power-automate-integration 

     

    There is also this article that I wrote some time ago about the first steps with Office Scripts: http://digitalmill.net/2023/06/19/get-started-with-office-scripts/ 

     

    Let me know if it works for you or if you need any additional help!

     

    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.

    http://digitalmill.net/ 

  • abm abm Profile Picture
    32,464 Most Valuable Professional on 09 Aug 2023 at 15:47:26
    Re: Extract the Hyperlink from an cell in Excel

    Hi @ezequiel 

     

    What's the Excel column format type? Could you use that link as a text data type?

     

    Thanks

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 the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Automate - Building Flows

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 223 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 222 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 190

Overall leaderboard