I need help with updating spreadsheet-linked tables in Google Documents using the API. When I use the API explorer to get document data in JSON format, I can find the tables, but I don’t see any connection info to the original spreadsheet. The JSON only shows the actual text content from the cells, not the link itself.
Here’s a sample table structure I got from the API response with 2 rows and 1 column containing “Math Score” and “Science Score”:
{
"dataTable": {
"totalRows": 2,
"totalColumns": 1,
"rowData": [
{
"rowStart": 45,
"rowEnd": 62,
"cellData": [
{
"cellStart": 46,
"cellEnd": 62,
"cellContent": [
{
"contentStart": 47,
"contentEnd": 62,
"textBlock": {
"textElements": [
{
"elementStart": 47,
"elementEnd": 57,
"textContent": {
"text": "Math Score",
"formatting": {
"bold": true,
"textColor": {
"colorValue": {
"rgbValues": {
"redValue": 0.2,
"greenValue": 0.4,
"blueValue": 0.9
}
}
},
"textSize": {
"sizeValue": 18,
"sizeUnit": "PT"
}
}
}
}
]
}
}
]
}
]
}
]
}
}
Basically I want to do the same thing as clicking the “UPDATE” button on linked tables but through code. Any ideas on how to make this work?