I’m currently trying to automate the creation of a Google Slides based on data from Sheets. The idea is to give each data row from the Sheet its own Slide (works just fine so far) and include a table of contents. The problem arises here though. I map out my data array to a string version of it then display it as a numbered list on the slide.
However, getting it to be properly displayed becomes an issue. Since it’s possible to be dealing with 10+ items and I want some proper spacing between each, a single column will overflow outside of the slide so I’m forced to use a second column and cut it off at 6 items.
The 2 options I’ve come up with so far are:
-
Create 1 textbox and somehow split the list over 2 columns if necessary. This would fix the numbering issue as it’s a single list, but I am not aware of any way to do this in slides (correct me if I missed something)
-
Create 2 textboxes and slice the data so the overflow is put into the second one instead. This works fine, but I’m stuck on the numbering problem here. I can create numbered lists just fine using the following code, but I can’t find a way to make the numbering start from a different index.
const textRange = box.getText();
textRange.setText(''); // Clear data
data.forEach((row) => {
textRange.appendParagraph(row);
})
textRange.getListStyle().applyListPreset(SlidesApp.ListPreset.DIGIT_ALPHA_ROMAN);
Anyone here have an idea on how to solve these problems or a way to avoid them altogether?