Skip to main content
Solved

Read embedded url in Google Sheet cell?

  • May 6, 2024
  • 5 replies
  • 627 views

karol
Contributor
Forum|alt.badge.img+8

Hi everybody,

My client has a spreadsheet that contains a list of Google Map urls embedded in text, inside cells in a Google Sheet. Using the Google Sheet  V4 reader, I am unable to read the url of the embedded text into the workspace. For example, I cannot read the url for the Google Map url for Safe’s location in this spreadsheet.  I’m really hoping to mine the lat/long coordinates from these urls.

 

I use FME Desktop V2021.2.2.0 in production, but have Form V 2023.2.1.0 available, if needed.

Thanks!

Best answer by debbiatsafe

Hello @karol 

If the hyperlink is entered into Google Sheets using the hyperlink formula, you can get the value of the URL by setting the Render Value As parameter in the Google Sheets V4 reader as “Formula”.

You can then process the formula to extract the URL.

Based on your test spreadsheet, the URLs are simply pasted as hyperlinks. To read the hyperlinks, you can call the Google Sheets API using an HTTPCaller and specify you want the hyperlink values. You can use the same web connection as the Google Sheets reader for authentication in the HTTPCaller.

The hyperlink information is then returned as JSON. Process the JSON to get the hyperlink URL and merge the hyperlink information with the feature from the Google Sheets reader based on the row number.

I have attached an example workspace made in 2023 demonstrating this approach and I hope it helps.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • May 7, 2024

Hi everybody,

My client has a spreadsheet that contains a list of Google Map urls embedded in text, inside cells in a Google Sheet. Using the Google Sheet  V4 reader, I am unable to read the url of the embedded text into the workspace. For example, I cannot read the url for the Google Map url for Safe’s location in this spreadsheet.  I’m really hoping to mine the lat/long coordinates from these urls.

 

I use FME Desktop V2021.2.2.0 in production, but have Form V 2023.2.1.0 available, if needed.

Thanks!

Hi @karol 

 

In the Parameters you can select the option:

 

 

Link enabled:

 


karol
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • May 7, 2024

Hi @danilo_fme , thanks for your help!

 

I don’t see the ability to manually set the data types in either the Google Sheets V4 reader or feature reader. This screenshot is from the reader, and I cannot edit or add anything in this screen. I’m not sure how to get to the menu you sent a screenshot of.

 

 


debbiatsafe
Safer
Forum|alt.badge.img+21
  • Safer
  • Best Answer
  • May 8, 2024

Hello @karol 

If the hyperlink is entered into Google Sheets using the hyperlink formula, you can get the value of the URL by setting the Render Value As parameter in the Google Sheets V4 reader as “Formula”.

You can then process the formula to extract the URL.

Based on your test spreadsheet, the URLs are simply pasted as hyperlinks. To read the hyperlinks, you can call the Google Sheets API using an HTTPCaller and specify you want the hyperlink values. You can use the same web connection as the Google Sheets reader for authentication in the HTTPCaller.

The hyperlink information is then returned as JSON. Process the JSON to get the hyperlink URL and merge the hyperlink information with the feature from the Google Sheets reader based on the row number.

I have attached an example workspace made in 2023 demonstrating this approach and I hope it helps.


karol
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • May 8, 2024

Thank you, @debbiatsafe ! This will work. Very cool :) 


danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • May 8, 2024

Hello @karol 

If the hyperlink is entered into Google Sheets using the hyperlink formula, you can get the value of the URL by setting the Render Value As parameter in the Google Sheets V4 reader as “Formula”.

You can then process the formula to extract the URL.

Based on your test spreadsheet, the URLs are simply pasted as hyperlinks. To read the hyperlinks, you can call the Google Sheets API using an HTTPCaller and specify you want the hyperlink values. You can use the same web connection as the Google Sheets reader for authentication in the HTTPCaller.

The hyperlink information is then returned as JSON. Process the JSON to get the hyperlink URL and merge the hyperlink information with the feature from the Google Sheets reader based on the row number.

I have attached an example workspace made in 2023 demonstrating this approach and I hope it helps.

Great solution @debbiatsafe