Google Sheet API batch update issue iOS

后端 未结 2 1800
星月不相逢
星月不相逢 2021-01-14 20:09

Am trying to do a batch update with google sheet API for iOS but am getting an error invalid value at \'data[0].values[0]\' (type.googleapis.com/google.protobuf.ListValue),

相关标签:
2条回答
  • 2021-01-14 20:18

    The error indicates that a request parameter has an invalid value and the error response provide the information as to which value was invalid. Do not retry without fixing the problem. You need to provide a valid value for the parameter specified in the error response. You need to make changes to the API query in order for it to work. Your Customer Name, Latitude, Longitude value was invalid. Check your error log.

    Here's a Sheets API BatchUpdate blog encountered 400 error response: https://github.com/google/google-api-nodejs-client/issues/588

    0 讨论(0)
  • 2021-01-14 20:29

    Values are intended to be a 2d array. They should be in the form of [[ 'a', 'b', 'c'], [ 1, 2, 3 ]]

    You're supplying the values as a 1d array ['a', 'b', 'c'], and the error message is complaining the 'a' can't fit into a ListValue since it's not an array. The solution is to use a 2d array, although I can't provide an example here of exactly what you should do since I'm not sure how you intend your input to map to the spreadsheet.

    0 讨论(0)
提交回复
热议问题