Google Sheet API batch update issue iOS

后端 未结 2 1804
星月不相逢
星月不相逢 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: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.

提交回复
热议问题