Skip to main content
writeValues replaces cell values in one or several A1 or named ranges in one atomic value request.

Example

Inputs

spreadsheet and one update or non-empty update array are required. Each update contains range, values, and optional majorDimension: "rows" | "columns" (default rows). Cell values are string, number, boolean, or null; null clears the cell. inputMode defaults to userEntered, which parses formula-looking strings and other UI input; raw stores strings literally. includeValues defaults to false. Optional responseValueRender and responseDateTimeRender use the modes from Read values. account optionally selects the Google account binding.

Output

Returns spreadsheet ID, total updated cells/rows/columns/sheets, and an updates array with updatedRange, counts, and optional returned { range, majorDimension, values }. Returned values appear only when includeValues is true.