How to update a row of cells in Smartsheet API 2.0

3.9k views Asked by At

I recently wrote a program using the API 1.1 to automatically update a sheet and it uses the line

smartsheet.rows().updateCells(rowId, cells);

to update a row of cells in the sheet. In the 2.0 version rows() has been deprecated but I still can't find the 2.0 equivalent for this line.

1

There are 1 answers

0
Aditi Nioding On BEST ANSWER

updateCells() has been replaced by updateRows() and can be accessed using rowResources(). Detailed sample code is available here: http://smartsheet-platform.github.io/api-docs/#update-cell(s)

Sample code:

Row rowA = new Row.UpdateRowBuilder().setCells(cellsB).setRowId(rowId).build();

List<Row> updatedRows = smartsheet.sheetResources().rowResources().updateRows(sheetId, Arrays.asList(rowA));