Exemple #1
0
        public void MergeCellsAt(TableIndexRange range)
        {
            BatchUpdateSpreadsheetRequest requestBody = new Request
            {
                MergeCells = new MergeCellsRequest
                {
                    Range     = range.ToGoogleGridRange(),
                    MergeType = "MERGE_ALL",
                }
            }.ToBody();

            SheetsService.Spreadsheets.BatchUpdate(requestBody, SpreadsheetId).Execute();
        }
Exemple #2
0
        public void FormatCellsAt(TableIndexRange range, ICellStyle style)
        {
            BatchUpdateSpreadsheetRequest requestBody = new Request
            {
                RepeatCell = new RepeatCellRequest
                {
                    Range  = range.ToGoogleGridRange(),
                    Cell   = style.ToGoogleCellData(),
                    Fields = AllFields
                }
            }.ToBody();

            SheetsService.Spreadsheets.BatchUpdate(requestBody, SpreadsheetId).Execute();
        }