Freeze rows and set styles with Google spreadsheet API

This is now available in the v4 API.

Here is the reference for the JAVA API implementation: https://developers.google.com/resources/api-libraries/documentation/sheets/v4/java/latest/com/google/api/services/sheets/v4/model/GridProperties.html#setFrozenRowCount(java.lang.Integer)

Here is the API documentation: https://developers.google.com/sheets/reference/rest/v4/spreadsheets#gridproperties

If you want to do it w/ an App Script you can as well: https://developers.google.com/apps-script/reference/spreadsheet/sheet#setFrozenRows(Integer)

This is the request I made w/ the Ruby API:

update_sheet_properties: {
  properties: {
    sheet_id: 'YOUR SHEET ID HERE',
    grid_properties: { frozen_row_count: 4 }
  },
  fields: 'gridProperties.frozenRowCount'
}