1

I have a weekly Slides presentation that summaries result from Sheets. I don't want to have to edit the presentation every week, copying and pasting text from one webapp to another.

Since it is possible to insert a Chart and copy and paste a range from Google Sheets into Google Slides and maintain active link, how can I also apply active link to a single text box if I only want one cell value?

If this can be done then we can effectively separate the presentation from the underlying data.

1

How to merge data into slides, is what I believe you are actually looking for.

The overall steps are:

  1. Create your presentation exactly as you want it to appear using dummy content to help you with the design.

  2. For each content element that you'll be inserting, replace the dummy content with a tag. Tags are just text boxes or shapes with a unique string.

  3. In your code, use the Google Drive API to make a fresh copy of the presentation.

  4. In your code, use the Slides API's batchUpdate method, with a set of replaceAllText requests, to perform all the text substitutions throughout the presentation. Use replaceAllShapesWithImage requests to perform image substitutions throughout the presentation.

When setting tags, make sure to use strings that are unlikely to occur normally. For example, {{account-holder-name}} might be a good tag.

Once you've created a deck with tags in it, be sure to make a copy and use the Slides API to manipulate the copy. Don't use the Slides API to manipulate your master "template" copy!

The above process is part of post involving quite a bit of coding and you can read about it, step by step under Merging Data into Slides

There is also a video in YouTube (Replacing text & images with the Google Slides API - The G Suite Dev Show) accompanying the post.

  • This is quite a dirty way of doing it though, but no choice if this is the only option we have. – Jake Oct 2 at 15:05
  • I'm afraid so :/ And anyway even Google has this as the "official" way. (If you want, you could probably accept the answer.) – marikamitsos Oct 2 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.