qeet / IMPORTJSONAPI

Use JSONPath to selectively extract data from any JSON or GraphQL API directly into Google Sheets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

request to add type for 'image'

frankis opened this issue · comments

Since gSheets allows inline images, could you please consider adding a type for those or adding an option to show the URL +adding a column for the image itself?

=IMPORTJSONAPI("https://autocomplete.clearbit.com/v1/companies/suggest?query=microsoft","$[0]","domain, logo")

  1. Option convert type to 'logo': A2 would then show the imamge instead of the URL
  2. Option keep image URL + add column next to it containing the image =IMAGE(A2) (if possible even with parammeters? =IMAGE(A2,4,100,100)

BTW: Thank you for sharing this code at all. It's a massive time saver!

commented

I looked into this and I don't think this is possible. The function can only return plain data types such as strings, numbers and dates. There is no functionality to return an image type or to set formulas (as far as I'm aware). See https://developers.google.com/apps-script/guides/sheets/functions#return_values

The best option is use another custom function such as described in the link below and run it from a custom menu so that it is able to directly manipulate cell data.
https://webapps.stackexchange.com/questions/74508/how-to-display-image-from-url-in-google-sheets-and-apply-it-to-multiple-rows