Home > Net >  Make Specific Part Bold in Google Sheets via Python gspread Api
Make Specific Part Bold in Google Sheets via Python gspread Api

Time:03-25

I have been trying to make a bold part of my cell using Gspread API. But I couldn't figure out how to do that. I found a way in that enter image description here

Note:

  • If your cell "A1" has already had the text of I would like to make bold specific part of my cell, you can also use the following request body.

      reqs = [
          {"updateCells": {
              "range": gridRange,
              "rows": [{"values": [{"textFormatRuns": [
                  {"format": {"bold": True}, "startIndex": 21},
                  {"format": {"bold": False}, "startIndex": 39}
              ]}]}],
              "fields": "textFormatRuns.format.bold"
          }}
      ]
    

References:

  • Related