Document apiReferenceTables

tables.setCellText

Replace the text content of a single table cell with plain text (one paragraph). Accepts either a direct cell locator (a tableCell block address with kind, nodeType, nodeId) OR a table target with rowIndex + columnIndex. Cell properties (vertical alignment, shading, borders, colspan/rowspan) are preserved. Use this for filling cells with values, replacing cell text, or populating empty tables. Much simpler than walking paragraphs and runs through superdoc_edit.

mutates documentdry runidempotent
doc.tables.setCellText(…)

Expected result

Returns a TableMutationResult receipt; reports NO_OP if the cell already contains exactly this text.

Inputs

Variant 1
targetTableCellAddressrequired
Fields
kind"block"required
nodeType"tableCell"required
nodeIdstringrequired
textstringrequired
Variant 2
nodeIdstringrequired
textstringrequired
Variant 3
targetTableAddressrequired
Fields
kind"block"required
nodeType"table"required
nodeIdstringrequired
rowIndexintegerrequired
columnIndexintegerrequired
textstringrequired
Variant 4
nodeIdstringrequired
rowIndexintegerrequired
columnIndexintegerrequired
textstringrequired

Result

Output fields
true
successtruerequired
tableTableAddress
Fields
kind"block"required
nodeType"table"required
nodeIdstringrequired
trackedChangeRefsEntityAddress[]
false
successfalserequired
failureobjectrequired
Fields
code"NO_OP" | "INVALID_TARGET" | "TARGET_NOT_FOUND" | "CAPABILITY_UNAVAILABLE"required
messagestringrequired
detailsunknown

Failures

Pre-apply throws

  • TARGET_NOT_FOUND
  • INVALID_TARGET
  • CAPABILITY_UNAVAILABLE

Non-applied receipt codes

  • INVALID_TARGET
  • NO_OP

Raw schemas

Open the generated JSON artifact for the exact input, output, success, and failure schemas represented by this contract version.

View raw JSON schemas