The Google Sheets API allows you to update the formatting of cells and ranges within spreadsheets. The Google Sheets API is a RESTful interface that lets you read and modify a spreadsheet's data. The most common uses of this API include the following tasks:
Create spreadsheets Read and write spreadsheet cell values Update spreadsheet formatting Manage Connected Sheets
To utilize these code, users need to generate their own credentials from Google API.
I also include a jupyter notebook file of formmating with Microsfot Excel.