谷歌表格样式(仅首行加粗)

2024-09-28 05:28:03 发布

您现在位置:Python中文网/ 问答频道 /正文

如何使用Python和googlesheetsapi只将Google工作表的第一行加粗。你知道吗

我用了这个:

{  
   "requests":[  
      {  
         "repeatCell":{  
            "range":{  
               "sheetId":0,
               "startRowIndex":0,
               "endRowIndex":1
            },
            "cell":{  
               "userEnteredFormat":{  
                  "textFormat":{  
                     "bold":true
                  }
               }
            },
            "fields":"userEnteredFormat.textFormat.bold"
         }
      }
   ]
}

但这是整个牢房的黑体字。你知道吗


Tags: truefieldsgooglecellrangerequestsboldtextformat
1条回答
网友
1楼 · 发布于 2024-09-28 05:28:03

更改代码如下:

{  
   "requests":[  
      {  
         "repeatCell":{  
            "range":{  
               "endRowIndex":1
            },
            "cell":{  
               "userEnteredFormat":{  
                  "textFormat":{  
                     "bold": true
                  }
               }
            },
            "fields":"userEnteredFormat.textFormat.bold"
         }
      }
   ]
}

这将使工作表的第一行加粗。 有关更多信息,请阅读googlesheets中有关range的文档。你知道吗

相关问题 更多 >

    热门问题