I’m trying to replicate tables from a Google Docs template to a different document using the API. Everything works well with standard tables, but I face challenges when copying tables that include headers.
My initial request looked like this:
"changeTableRowStyle": {
"tableLocation": {
"segmentId": "",
"index": 425
},
"rowIndexes": [0],
"rowStyle": {
"rowMinHeight": {
"unit": "PT"
},
"hasTableHeader": true
},
"fields": "*"
}
While this copies the table, the headers don’t carry over. To resolve this, I adjusted the fields parameter:
"changeTableRowStyle": {
"tableLocation": {
"segmentId": "",
"index": 425
},
"rowIndexes": [0],
"rowStyle": {
"rowMinHeight": {
"unit": "PT"
},
"hasTableHeader": true
},
"fields": "rowMinHeight,hasTableHeader"
}
However, this resulted in the following error:
changeTableRowStyle: Unallowed field: hasTableHeader
I’ve tried using other properties of TableRowStyle without any issues. I’m unclear if this is a restriction in the API or if I’m missing something in my setup. Any help would be appreciated.