Render date option with Values.get

370 views Asked by At

Cannot bind the query parameter for rendering the date using Google Sheets API v4 Values.get, it is giving the error:

Invalid JSON payload received. Unknown name "DateTimeRenderOption": Cannot bind query parameter.

What is the correct JSON payload?

var response = Sheets.Spreadsheets.Values.get("someSpreadsheetId", "Sheet1!A7", {"DateTimeRenderOption" : "SERIAL_NUMBER"});

PS = Quite strange that there is no code samples in Google Sheets API documentation.

1

There are 1 answers

1
random-parts On BEST ANSWER

Change DateTimeRenderOption to dateTimeRenderOption

The API Docs are a bit strange, especially when they mix capitalization use.