0

I'm using the google API on Python to create a table on a Slide. I can populate the table well enough, however, I haven't gotten how to change the dimensions (row, height) of the cells. Please help!

I am able to edit the text properties like Font and Font size but I'm not sure how to change the size of the cell that contains it.

This is my code for updating the font in a cell. Is there a way to update the height and width here?

reqs = [
    {
      "updateTextStyle": {
        "objectId": tableID,
        "cellLocation": {
          "rowIndex": i,
          "columnIndex": j
        },
        "style": {
          "foregroundColor": {
            "opaqueColor": {
              "rgbColor": {
                "red": 0,
                "green": 0,
                "blue": 0
              }
            }
          },
          "bold": True,
          "fontFamily": "Gill Sans",
          "fontSize": {
            "magnitude": 8,
            "unit": "PT"
          }
        },
        "textRange": {
          "type": "ALL"
        },
        "fields": "foregroundColor,bold,fontFamily,fontSize"
      }
    }for i, order in enumerate(orders) for j, data in enumerate(order)
  ]

PaoloAgVa
  • 1,302
  • 1
  • 10
  • 21
  • 1
    Is this thread useful for your situation? https://stackoverflow.com/q/56014369/7108653 – Tanaike Jun 13 '19 at 21:54
  • Hello! Yes, this helped. I am now able to reduce the size of the column but I cannot go under a certain point. Any idea on how to force it to go smaller? – PaoloAgVa Jun 14 '19 at 10:49
  • @PaoloAgVa from my personal experience the lowest you can go is 32 in PT units. Any chance you have found a way/method how to make it less? Other than copying a templated table within the slides, I don't see other ways thus far. – Simas Nov 09 '20 at 22:05

0 Answers0