Skip to content

Update Google spreadsheet

Danylo Lytvynenko edited this page Sep 23, 2020 · 1 revision

NOTE: Used only in editor mode

Create sheet

If you want to add a new sheet to a Google spreadsheet, here's an example of how you can do it, but be careful if there is such a page, as it will give an error

var spreadsheet = new Spreadsheet("{Spreadsheet Id}");
spreadsheet.CreateGoogleSheet("{New Name Sheet}");

Update Cell

If you want to update a cell, try this code, just update each cell separately

var spreadsheet = new Spreadsheet("{Spreadsheet Id}");
spreadsheet.UpdateGoogleCell("Sheet1!F3", "New Value");//SheetName!CellAddress

Append cells

You can add a range of values to the end of the specified page

var spreadsheet = new Spreadsheet("{Spreadsheet Id}");
spreadsheet.AppendGoogleCell("Sheet1!A:C", new List<object>()
            {
               "World",
               "is",
               "wonderful"
            });

Delete cells

Everything is simple here, you indicate where you delete and everything is deleted

var spreadsheet = new Spreadsheet("{Spreadsheet Id}");
spreadsheet.DeleteGoogleCell("Sheet1!A1:F1");
Clone this wiki locally