Formatting cells with the Google Sheets API (The G Suite Dev Show)

The latest versions of the Google Sheets API let developers do something they weren’t able to do before: format spreadsheets cells. This new feature uses requests to effect the changes desired, and in this video, Google engineer Wesley Chun demonstrates how to put together the correct JSON payloads forming those requests. By the end of the video, you will have learned how to create a variety of formatting commands and send them to the API to help enhance your applications!

Related links for this episode:

Google Sheets API concepts & guides:

Formatting & other sample JSON payloads:

Date, time, and number formatting guide:

Deeper dive of code used in this video:

Migrating SQL data to Google Sheets blogpost & video:

Sheets API GridRange documentation page:

Sheets API formatting field masks:

General information on field…

android eclipse tutorial for beginners

12 Comments on “Formatting cells with the Google Sheets API (The G Suite Dev Show)”

  1. I'm working with the Google Spreadsheet API.
    I can successfully upload a file.
    But when i try to free the first row of the table I receive an error.
    The error says that i need to pass the worksheet name.
    I have no idea where i have to pass the name.

    I build the request like given in the documentation:
    List<Request> requestList = new ArrayList<>();
    Request request = new Request().setUpdateSheetProperties(new UpdateSheetPropertiesRequest()
    BatchUpdateSpreadsheetRequest body = new BatchUpdateSpreadsheetRequest();
    client.spreadsheets().batchUpdate(spreadsheetId, body).execute();

    I tried to pass the default worksheet name at "setfields" but then i get an invalid field error.
    I am happy about any help.

  2. I have done some fairly heavy sheets/survey api programming however considering I had no idea how to when I first started. I would love to see some of this use. Or some cross-interaction sheets! Stack exchange only goes so far.

  3. Creating spreadsheets with formulas IS programming. When they get complex you run into the same kind of issues any other software program can have. AND you should test your spreadsheet to make sure it works correctly.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.