2017-10-10 52 views
0

I have only one row '1,[space],3' which I input it manually谷歌片REST API追加不正確的數據

然後我想追加的新行3個細胞 '1,2,3' 使用REST API

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?

+0

添加'json''Google-sheets-api'和'curl'標籤 –

+1

看來我將A1:C1的範圍更改爲A1可以解決問題。 – Sim

+1

我認爲這仍然是一個問題,雖然我的問題是固定的:) – Sim

回答

0

如果有一行,並且您想追加一個新行(1,2,3)。 範圍應該是A2:C2或A1,A1:C1會導致不正確的行爲。