Smartsheet.Api.Internal.SheetResourcesImpl.UpdateSheet C# (CSharp) Method

UpdateSheet() public method

Update a sheet.

To modify Sheet contents, see Add Row(s), Update Row(s), and Update Column.

This operation can be used to update an individual user’s sheet settings. If the request body contains only the userSettings attribute, this operation may be performed even if the user only has read-only access to the sheet (i.e. the user has viewer permissions, or the sheet is read-only).

It mirrors To the following Smartsheet REST API method: PUT /sheets/{sheetId}

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public UpdateSheet ( Api.Models.Sheet sheet ) : Api.Models.Sheet
sheet Api.Models.Sheet the sheet To update
return Api.Models.Sheet
        public virtual Sheet UpdateSheet(Sheet sheet)
        {
            return this.UpdateResource("sheets/" + sheet.Id, typeof(Sheet), sheet);
        }

Usage Example

        public virtual void TestUpdateSheet()
        {
            server.setResponseBody("../../../TestSDK/resources/updateSheet.json");

            Sheet sheet    = new Sheet.UpdateSheetBuilder(123).SetName("new name").Build();
            Sheet newSheet = sheetResource.UpdateSheet(sheet);

            Assert.AreEqual("new name", newSheet.Name, "Sheet update (rename) failed.");
        }
All Usage Examples Of Smartsheet.Api.Internal.SheetResourcesImpl::UpdateSheet