I'm starting to develop with the Google Sheets api after checking the documentation there are several things that I don't understand or I can't find.
This is the endpoint I am testing:
spreadsheets.values.batchUpdate
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/batchUpdate
What I am trying to do is format cells to plain text from the API, the same thing I do from the spreadsheet by clicking on Format > Number > Plain text
How should I create the JSON
from the API to apply the same format to an entire column?
This is what happens when I format the cell to Plain Text
from the sheet itself:
- This is the cell I am going to format:
- This is what I do:
Format > Number > Plain text
- This is the result:
This is what happens when I format the same cell to Plain Text from the google API:
This is the JSON that I apply:
"requests": [ { "repeatCell": { "range": { "sheetId": 3, "startColumnIndex": 1, "endColumnIndex": 2, "startRowIndex": 1, "endRowIndex": 2 }, "cell": { "userEnteredFormat": { "numberFormat": { "type": "TEXT" } } }, "fields": "userEnteredFormat.numberFormat" } } ] }```
This is the result:
My problem: How can I do from the API the same thing that I do directly from the sheet?