2017-10-10 21 views
0

I have only one row '1,[space],3' which I input it manuallygoogle Blätter Rest api falsche Daten

anhängen Dann möchte ich eine neue Zeile mit 3-Zellen '1,2,3' api mit Rest

curl -X POST \ 
 
    'https://sheets.googleapis.com/v4/spreadsheets/12_Ci93pDWrmQGLt3D5jg_Vb7Xi7vmHI9o62F58dpLeA/values/aaa%21A1%3AC1:append?insertDataOption=INSERT_ROWS&valueInputOption=RAW' \ 
 
    -H 'authorization: Bearer ya29.GlvgBH1pkFnZKs8cz0s0o7VyPUloPma1i2ZU-JUJGczIfFGy1Iw2XJUOMh4L9r2pTNYYVsmhMdf-2LfW4J38RMe5FosfeQjcTsZ6SiIGq1wcDzvSQjeHdY0P7iDh' \ 
 
    -H 'cache-control: no-cache' \ 
 
    -H 'content-type: application/json' \ 
 
    -H 'postman-token: b6de9e14-d792-98a5-6d6d-183a1034cea5' \ 
 
    -d '{ "majorDimension": "ROWS", "values": [ [ "1", "2", "3" ] ] } '

It's strange that the newly added row has two spaces at the head '[space],[space],1,2,3', if the first row has no space, it would be normal as '1,2,3' please advice how can I add it without these 2 spaces? anhängen

+0

Hinzufügen 'Json' 'Google-Blätter-api' und' Curl' Tag –

+1

Es scheint, dass ich den Bereich von A1 ändern: C1 zu A1 würde das Problem lösen. – Sim

+1

Ich denke, das ist immer noch ein Problem, obwohl mein Problem behoben ist :) – Sim

Antwort

0

Wenn es eine Zeile gibt und Sie eine neue Zeile anhängen möchten (1,2,3). Der Bereich sollte entweder A2: C2 oder A1 sein, A1: C1 würde zu falschem Verhalten führen.