I'm getting a 400 Error in chart with Excel


« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Michal on 25th August 2017
Hi, Im testing those graphs and with copy/paste code from example I get error

RGraph.common.sheets.js:138 GET spreadsheets.google.com/feeds/cells/2PACX-1vTwMVN3C_DaOhDuivWoL7rJP4kFma1QFy-3F-uR92l_RAAb07iG7KDNok9MkrvdSEQqpBVzjnBQkaVB/4/public/full?alt=json-in-script&callback=__rgraph_JSONPCallback 400 ()
load @ RGraph.common.sheets.js:138
RGraph.Sheets @ RGraph.common.sheets.js:349
(anonymous) @ index.html:72

I copied the code to the sheet from my document and it shows that it can be wrong (ad. index.html:72, it's stored here in the code)
Can it be because the url to the docs is now docs.google.com/spreadsheets/.. etc?
Posted by Richard on 25th August 2017
Hi there,

> Can it be because the url to the docs is now docs.google.com/spreadsheets/.. etc?

Well all the examples are still working.

Why do you mention Excel in the subject?

If you grant public access to your Google Sheets spreadsheet I will setup an example to try and access it.



Richard
Posted by Michal on 25th August 2017
Hello,

Im testing the gauge example:
<script>
     new RGraph.Sheets('1HVCTrOhjWhqCR3EwJezPBjGx2cySZApNHki9EiiAl7c', 4, function (sheet)
     {
         var value = sheet.get('A1');

         var gauge = new RGraph.Gauge({
             id: 'cvs',
             min: 0,
             max: 100,
             value: value,
             options: {
                 textAccessible: true
             }
         }).grow();
     });
</script>

Here is my test spreadsheet:
docs.google.com/spreadsheets/d/1HVCTrOhjWhqCR3EwJezPBjGx2cySZApNHki9EiiAl7c/edit?usp=sharing
Posted by Richard on 25th August 2017
Hi there,

Your spreadsheet wasn't "Published to the Web" (the option to do this is in the file menu) so I did this and now this page is reading your sheet:

www.rgraph.net/tests/google-sheets.html



Richard
Posted by Michal on 28th August 2017
Thank you, that worked well :)

Add a reply




« Back to message list