-->
Page 1 of 2

Posting on google sheets

PostPosted: Thu May 03, 2018 8:08 am
by BRV64
Hello! I've been trying to post data on my google sheet with an XMEGA but I keep getting this error "POST requests require a <code>Content-length</code>" Can somebody help me?

AT+CIPSTART="TCP","sheets.googleapis.com",80

AT+CIPSEND=462
POST /v4/spreadsheets/1IIUYggTRVpAvd6cuqt38HODdUFKVMntZqtYdDxZKlw8/values/ROBOT!A1:D5?valueInputOption=USER_ENTERED
Host: sheets.googleapis.com
Content-Length: 269
Content-Type: text/xml

{"range": "Sheet1!A1:D5","majorDimension": "ROWS","values": [["Item", "Cost", "Stocked", "Ship Date"],["Wheel", "$20.50", "4", "3/1/2016"],["Door", "$15", "2", "3/15/2016"],["Engine", "$100", "1", "30/20/2016"],["Totals", "=SUM(B2:B4)", "=SUM(C2:C4)", "=MAX(D2:D4)"]],}

Re: Posting on google sheets

PostPosted: Fri May 04, 2018 3:23 am
by QuickFix
Haven't you asked this question earlier this week?
Was my answer not adequate enough or did it need more clarification?
There's no need to double- or cross-post... :roll:

Re: Posting on google sheets

PostPosted: Fri May 04, 2018 4:17 am
by McChubby007
BRV64 wrote:Hello! I've been trying to post data on my google sheet with an XMEGA but I keep getting this error "POST requests require a <code>Content-length</code>" Can somebody help me?

AT+CIPSTART="TCP","sheets.googleapis.com",80

AT+CIPSEND=462
POST /v4/spreadsheets/1IIUYggTRVpAvd6cuqt38HODdUFKVMntZqtYdDxZKlw8/values/ROBOT!A1:D5?valueInputOption=USER_ENTERED
Host: sheets.googleapis.com
Content-Length: 269
Content-Type: text/xml

{"range": "Sheet1!A1:D5","majorDimension": "ROWS","values": [["Item", "Cost", "Stocked", "Ship Date"],["Wheel", "$20.50", "4", "3/1/2016"],["Door", "$15", "2", "3/15/2016"],["Engine", "$100", "1", "30/20/2016"],["Totals", "=SUM(B2:B4)", "=SUM(C2:C4)", "=MAX(D2:D4)"]],}

I've said it on other posts, and I'll say it again here - this is to do with 'the web' : specific 3rd party protocol/interaction (in this case trying to 'speak' so google sheets understands you).
This has nothing to do with the esp8266; it has nothing to do with this forum.

It's like asking a forum dedicated to telephones to solve the problem of your inability to speak Chinese/Mandarin when phoning someone in China.

Re: Posting on google sheets

PostPosted: Sun May 06, 2018 7:18 pm
by BRV64
McChubby007 wrote:
BRV64 wrote:Hello! I've been trying to post data on my google sheet with an XMEGA but I keep getting this error "POST requests require a <code>Content-length</code>" Can somebody help me?

AT+CIPSTART="TCP","sheets.googleapis.com",80

AT+CIPSEND=462
POST /v4/spreadsheets/1IIUYggTRVpAvd6cuqt38HODdUFKVMntZqtYdDxZKlw8/values/ROBOT!A1:D5?valueInputOption=USER_ENTERED
Host: sheets.googleapis.com
Content-Length: 269
Content-Type: text/xml

{"range": "Sheet1!A1:D5","majorDimension": "ROWS","values": [["Item", "Cost", "Stocked", "Ship Date"],["Wheel", "$20.50", "4", "3/1/2016"],["Door", "$15", "2", "3/15/2016"],["Engine", "$100", "1", "30/20/2016"],["Totals", "=SUM(B2:B4)", "=SUM(C2:C4)", "=MAX(D2:D4)"]],}

I've said it on other posts, and I'll say it again here - this is to do with 'the web' : specific 3rd party protocol/interaction (in this case trying to 'speak' so google sheets understands you).
This has nothing to do with the esp8266; it has nothing to do with this forum.

It's like asking a forum dedicated to telephones to solve the problem of your inability to speak Chinese/Mandarin when phoning someone in China.


Where should I post it then?