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

前端 未结 5 1817
無奈伤痛
無奈伤痛 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 22:16

    FYI, while the majority of the documentation is just using the raw JSON, it should map 1:1 to the constructs in each language.

    For example, to update values you'd likely do something like:

    var valueRange = new ValueRange(); valueRange.values = { { 1, 2, 3 }, { 4, 5, 6 } }; var range = "A1"; var update = service.Spreadsheets.Values.Update(valueRange, spreadsheetId, range); var result = update.execute();

    The above is pseudo-code based on your code example and the reference docs @ https://developers.google.com/sheets/reference/rest/v4/spreadsheets.values/update.

提交回复
热议问题