Read, Write, and Verify a Cell Range
A 4-step recipe with Microsoft Excel. We can help you get access.
Recipe · 4 steps
Read, Write, and Verify a Cell Range
with Microsoft Excel
Read a cell range, overwrite its values in a session, and verify the result.
- Open a workbook session with persistChanges true so the values written later in this flow are saved back to the stored workbook.
- Read the range before writing so the caller retains the prior values and can confirm the target range has the row and column count it expects.
- Patch the supplied two-dimensional values into the range. Only values are sent, so any existing number formats on the cells are left intact.
- Re-read the same range to verify the committed values, including the text representation Excel rendered for each cell.
What you'll need to have ready
- itemId: The drive item id of the workbook file.
- worksheetIdOrName: The worksheet holding the range (e.g. "Sheet1").
- address: The range address in A1 notation (e.g. "A1:B2").
- values: A two-dimensional array of cell values whose shape must match the target range exactly; Excel rejects a mismatched write.
For your developer
Arazzo workflow microsoft-excel:session-range-update, 4 operations: createWorkbookSession → getRange → updateRange → getRange. Specs on APIs.io.