Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request to add type for 'image' #27

Open
frankis opened this issue Apr 19, 2021 · 1 comment
Open

request to add type for 'image' #27

frankis opened this issue Apr 19, 2021 · 1 comment

Comments

@frankis
Copy link

frankis commented Apr 19, 2021

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!

@frankis frankis changed the title request to add type for 'mage' request to add type for 'image' Apr 19, 2021
@qeet
Copy link
Owner

qeet commented Apr 22, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants