I have some data along with images in a Google Sheet. I am sending the data as a JSON response and I have deployed the script as a web app.
I am using the code:
SpreadsheetApp.openByID("<sheet_id>").getSheets[0].getDataRange().getValues()
I am able to load the data properly but I am not able to load the images. For the cells with image, I get Empty String.
Can you please suggest a way to load images using the same script?
If it can provide a URL to my image saved in the sheet, then also it will solve my problem as I just wan't to display the image.
function convImageToURI(){ var file=DriveApp.getFileById("Image File Id") var blob=file.getBlob(); var b64Url='data:' + blob.getContentType() + ';base64,' + Utilities.base64Encode(blob.getBytes()); Logger.log(b64Url); return b64Url; }- Cooper