gpt4 book ai didi

google-spreadsheet-api - 如何使用 Google Sheets API 自动调整列宽?

转载 作者:行者123 更新时间:2023-12-04 23:11:29 26 4
gpt4 key购买 nike

有没有办法使用 Google Sheets API 在 Google Sheets 中自动调整列宽?
我只能找到 DimensionProperties但它需要精确的值 n 像素。

最佳答案

您可以使用 Sheets API 的 autoResizeDimensions 来实现它。您可以在以下链接中查看详细信息。

端点

POST https://sheets.googleapis.com/v4/spreadsheets/### fileId ###:batchUpdate

请求正文:
{
"requests": [
{
"autoResizeDimensions": {
"dimensions": {
"sheetId": sheetId,
"dimension": "COLUMNS",
"startIndex": 0,
"endIndex": 3
}
}
}
]
}

引用 :
  • sheets.spreadsheets.batchUpdate
  • autoResizeDimensions
  • Sample: Automatically resize a column

  • 如果我误解了你的问题,我很抱歉。

    关于google-spreadsheet-api - 如何使用 Google Sheets API 自动调整列宽?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49970988/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com