How to add a sheet in google sheets API v4 in C#?

前端 未结 5 1704
無奈伤痛
無奈伤痛 2021-02-10 21:28

I\'ve been using Google Sheets API, and following The Google Guide. However there is no example, even beyond the second page of google, to add a worksheet and write to a new she

5条回答
  •  天涯浪人
    2021-02-10 21:55

    Further extending Sam's answer. The following gets me to update a cell.

                ValueRange VRx = new ValueRange();
                IList> xx = new List>();
                xx.Add(new List { "test" });
                VRx.Values = xx;
                SpreadsheetsResource.ValuesResource.UpdateRequest update = service.Spreadsheets.Values.Update(VRx, spreadsheetId, "back!A19");
                update.ValueInputOption = SpreadsheetsResource.ValuesResource.UpdateRequest.ValueInputOptionEnum.RAW;
                UpdateValuesResponse result = update.Execute(); 
    
    
    

    Hope this helps!

    提交回复
    热议问题