0

I would like to know if there was a way to make an image in a cell of a Spreadsheets appear in a Google Slides automatically.

I've already tried this :

`

function fillTemplate() {

 var PRESENTATION_ID = "<PRESENTATION_ID>";

 var presentation = SlidesApp.openById(PRESENTATION_ID);

 var values = SpreadsheetApp.getActive().getDataRange().getValues();

 values.forEach(function(row) {
   var templateVariable = row[0];
   var templateValue = row[1];
   presentation.replaceAllText(templateVariable, templateValue);
 });

}

`

But sadly, as a result, my {{Logo}} variable didn't display the logo image but : "Imagecell".

Do you think there is a solution for this problem? I would be very grateful for your help!

Best,

Nonomg

nonomg
  • 9
  • 4
  • About `I would like to know if there was a way to make an image in a cell of a Spreadsheets appear in a Google Slides automatically.`, in your situation, how is the image put in the cell? – Tanaike Nov 11 '22 at 01:06
  • Hi Tanaike, and thanks for your kind help. Actually, the image is imported by myself as an import. But lately, it's gonna be an image imported by a user (responding to a specific google forms) – nonomg Nov 11 '22 at 22:46
  • Thank you for replying. From your reply, I understood that the image is manually inserted in a cell. In this case, unfortunately, in the current stage, the image cannot be directly retrieved by the Google Apps Script. But, there is a workaround. So, I thought that this thread might be useful. https://stackoverflow.com/a/64040243/7108653 – Tanaike Nov 12 '22 at 00:08
  • Thanks so much for replying. Really appreciate your help. I've tried this workaround and it was so useful, thanks. But I'm gonna try to upgrade my V1 work stuff, to automate it a bit. So now, I would like to implement users's google form answers into a slides template (including a question where they'll need to implement their company logo as a file). Do you have any ideas, ressources that can help me succeed this task? Thanks! – nonomg Nov 12 '22 at 11:17
  • Thank you for replying. I'm glad your issue was resolved. From your reply, I flagged your question as a duplicated question. – Tanaike Nov 12 '22 at 11:30

0 Answers0