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
Any help on solve this?
Thanks
Ezequiel
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):
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.
Hi @ezequiel
What's the Excel column format type? Could you use that link as a text data type?
Thanks
WarrenBelz
146,745
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional