Answer the question
In order to leave comments, you need to log in
How to merge cells in a Google Docs table using Apps Script?
Hello, I'm trying to merge several cells in a table. But instead of the desired result, I get the inexplicable.
I have a table with 4 columns. Tried to merge two sibling cells into one using the .merge() method - Link to documentation
But instead of merging them, the script just hides one of them and this is the result:
What could be the problem?
Answer the question
In order to leave comments, you need to log in
When you merge elements, the element on which the .merge() method is called is removed. Which, in fact, is shown in your image.
If, instead of the element removed during the merging, another (new) element is added, then everything falls into place.
Read the documentation carefully.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question