Before start, i've searched about this topic on internet but many of the information is old, when was impossible to create a merged cell in Docs using the UI, however now it possible.
Since the google apps script support page said that i need to ask for help in this site.
I want to know if is possible to merge two cell (colspan) with the recent changes in google Docs.
There's a pretty good explanation in the Apps Script Documentation, but the example deals with paragraphs.
Tables in Google Documents are made of TableRow objects filled with TableCell objects. You can think of a table as an array of arrays. In fact, you can use an array of arrays to create a table using the Body.appendTable() method.
TableCells have a merge() method that merges a cell with its preceding sibling cell. The text is joined with a newline.
The code for merging two cells would look something like this: