2

I have a simple stock database on a google sheet, with images inserted in cells, structured as in the image below. Currently I manage about 500 items in this way.

enter image description here

QUESTION

I need a script to export each cell of the column "image" as an image file (.png or .jpg), naming it as indicated in the column "code". E.g. the first image file has to be named led-fixer_COM.png

Is it possible? Can you address me to the right approach?

In the google Sheet reference I'have not found any method for directly converting cells, or ranges, as an image.

PS: please note that some images are linked as hyperlinks (=hyperlink("https://drive.google.com/...",image("https://drive.google.com/..."))), while others are not (no formula is present inside cell).

Any help is appreciated.

Kurt UXD
  • 5,776
  • 2
  • 20
  • 16
  • What is the result of getting the value of the cell when you use getRange? – bearacuda13 Jan 07 '21 at 22:56
  • I stuck a web URL, a link to a drive image, and an upload from my computer and tried to see them with getValues. I got nothing. I tried some other silly commands. My conclusion is the images are not visible to apps script. – aNewb Jan 07 '21 at 23:40
  • Good to know. Good luck for if anyone finds something! I've found AppsScript to be pretty limited, so it wouldn't surprise me if it weren't possible. I'd check getDataSourceUrl() as well. – bearacuda13 Jan 07 '21 at 23:45
  • 2
    Please read [this thread](https://stackoverflow.com/questions/56733340/how-to-access-new-in-cell-image-from-google-apps-script) which I believe at least one of the answers will be the solution to your problem. – Marios Jan 08 '21 at 00:00

0 Answers0