Skip to main content

Notifications

Community site session details

Community site session details

Session Id : kJ65jRQej3Kq52AQzZz0YC
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
    3,952 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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

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

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started