I am trying to change cell format to plain text
from google api
: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/batchUpdate
Doing it directly from google drive gives me a completely different result than doing it from the API.
I add the following examples of what I am trying to do.
This is from the spreadsheet formatting:
- This is the field I want to format as plain text
This is what I do
Format > Number > Plain Text
This is the result:
This is what happens when I format it from the google API with the above JSON:
- This is the field I want to format:
This is the XML that I am applying from the API:
"requests": [ { "repeatCell": { "range": { "sheetId": 3, "startColumnIndex": 2, "endColumnIndex": 3, "startRowIndex": 16, "endRowIndex": 17 }, "cell": { "userEnteredFormat": { "numberFormat": { "type": "TEXT" } } }, "fields": "userEnteredFormat.numberFormat" } } ] }```
This is the result of applying the format from the API:
My problem: how can I get the same thing from the API as from the sheet? What do I have to change in the JSON to correctly apply the format?