0

So, what I could achieve using the Google Sheets API is being able to create a new column using the following curl based call

curl -v \
-H 'Authorization: Bearer ya29.GlxUB9K_96tyQFyQ64eaYOeImtJt32213zjosf6LW1Inv6MOqQCCodA7CycvL5EFKIpeX4dVEebS4rUl24U1J7euhMjqBZq0QEU7ZK1B64THQXNwBpDvTzoUT9hTRg' \
-H 'Content-Type: application/json' \
-d '{
      "requests": [
        {
          "insertDimension": {
            "range": {
              "sheetId": 2052094881,
              "dimension": "COLUMNS",
              "startIndex": 0,
              "endIndex": 1
            }
          }
        }
      ],
    }' \
https://sheets.googleapis.com/v4/spreadsheets/1mHrPXQILuprO4NdqTgrVKlGazvvzgCFqIphGdsmptD8:batchUpdate

While this call is useful, it does not completely help. This is because the reason I wanted to add a column was to give a name and type (or format) the column values. But, as per this API, this is what see as an output enter image description here

Is there a way to create and add name and type to the column in a single API call?

Thanks a lot!

daydreamer
  • 87,243
  • 191
  • 450
  • 722
  • I thought that your this question might have been resolve at [your this question](https://stackoverflow.com/q/57260889/7108653) by yourself. Is my understanding correct? If there are some left issues for this question, can I ask you about them? – Tanaike Jul 30 '19 at 00:07
  • 1
    As per help from @Tanaike, this has been resolved in https://stackoverflow.com/questions/57260889/using-google-sheets-api-adding-and-updating-column-formatting-is-not-honoured-w – daydreamer Aug 05 '19 at 13:47
  • 3
    Possible duplicate of [Using Google Sheets API, adding and updating Column Formatting is not honoured when I entered the data](https://stackoverflow.com/questions/57260889/using-google-sheets-api-adding-and-updating-column-formatting-is-not-honoured-w) – daydreamer Aug 05 '19 at 13:47

0 Answers0