Actually I Am Converting The Data Present In Google Sheets To JSON Format ,
( ' https://spreadsheets.google.com/feeds/list/_google_sheet_id/od6/public/values?alt=json ' )
And I Am Using It For A Long Time , But Recently When I Opened The JSON Converted Link , I Faced A Issue
Sorry, unable to open the file at this time.
Please check the address and try again.
I Thought Only I Faced This Issue But I Had Another Link With Same Issue ,
I Think There's A Problem From Server's End
If Not Let Me Know The Reason Or
Any Other Alternatives To Convert Google Sheets To JSON Format
You are using an endpoint corresponding to Google Sheets v3 API, which shut down on August 2, 2021. Please take a look at the migration guide to v4 provided below.
I'm not sure what exactly you want to accomplish, but if you want to retrieve data from a specific sheet in v4, you could do something like this:
https://sheets.googleapis.com/v4/spreadsheets/{SPREADSHEET_ID}/values/{SHEET_NAME}?alt=json
Reference:
Migrate to the Google Sheets API
Related
New here, and still trying to wrap my mind around this importXML tool in Google Sheets. Seem to be able to get it to work on certain websites, but when data is deeply embedded in code, I struggle.
Goal: To pull in weight of items listed on bricklink.com to a Google Sheet.
Link to my Google Sheet: https://docs.google.com/spreadsheets/d/1_vhCkEJXofxMj1Cg117RgPJSFTqPF0ijo_f60mDR6MU/edit?usp=sharing
When I copy the xpath from the source code on the site, I'm given this value: //*[#id="item-weight-info"].
The existing fomula I have is: =IMPORTXML(D2,"//*[#id='item-weight-info']")
D2 Contains the web address where it concatenates the website + the item number.
Error I'm receiving is: "Could not fetch url: https://www.bricklink.com/v2/catalog/catalogitem.page?S=21318"
I did come across a potential JSON solution, set up a JSON function in the sheet, but have never written a script before. Tried to copy a script, and tweak as needed, but still no luck.
Is there an easier way to do this that I'm overlooking?
Any guidance or suggestions would be greatly appreciated. Thank you for your time!
I am using the Google Drive REST Api V2 in order to backup certain files to a local drive. Using the revisions list method (https://developers.google.com/drive/v2/reference/revisions/list), I obtain an export link to xlsx or docx depending on my file type.
For example, the link looks like : https://docs.google.com/spreadsheets/export?id=[fileId]&revision=[revisionId]&exportFormat=xlsx
However, I am now unable to use the export link to xlsx on any revision except the latest on my Sheet. When following the link, I obtain a page saying : "Google Docs encountered an error. Please try reloading this page, or coming back to it in a few minutes."
I have tried using the export links to other types and these seem to work fine. Please note that I do not have the same issue with Google Docs when I use the docx format.
I have also noticed that the REST Api V3 does not offer a way to export previous revisions of Google Drive documents. Therefore, I am wondering if the reason it is not working anymore on V2 is because it simply cannot be done anymore or it is just a temporary failure.
Found a workaround to your problem.
Use exportFormat=csv instead of exportFormat=xlsx.
This will download the file as .csv file. Open the CSV file and save it as .xlsx.
This should work for you.
EDIT:
Just to close this thread, the Google Drive team has recently fixed the said issue. &exportFormat=xlsx is now working as intended. I gave it a try and it works!
I recently started using the "New Google Sheets" (spreadsheets) and they changed the URL to a shared public spreadsheet and I am unsure how to obtain a JSON feed of the spreadsheet data.
Based on data from this URL: https://developers.google.com/gdata/samples/spreadsheet_sample
I can obtain the JSON data from an older version spreadsheet using the key parameter found in a URL of this format: http://spreadsheets.google.com/feeds/feed/key/worksheet/public/basic?alt=json-in-script&callback=myFunc
However, the new sheets have a URL like this:
https://docs.google.com/spreadsheets/d/SOME-IDENTIFIER/pubhtml
Using "SOME-IDENTIFIER" in place of the key does not work, I'm not sure how I can pull the JSON feed from a new spreadsheet... Anyone have any experience with this?
The format you should use is this :
https://spreadsheets.google.com/feeds/cells/
SHEET-IDENTIFIER/
SHEET_INDEX/
public/basic?alt=json-in-script&callback=JSON_CALLBACK
You can find SHEET_INDEX by looking at the end of the URL while editing the sheet.
...SHEET-IDENTIFIER/edit#gid=SHEET_INDEX
Make sure the spreadsheet is published (not only shared).
File/Pulish to the web...
I tried Vlad's answer and it didn't work; the editing url had gid=0, but in order to get the feed I wanted I had to put in 1 as the sheet index.
I'm trying to link Google Spreadsheet to twitter- have them talk to eachother - and I'm trying to use JSON.
(Trello and Google calendar are another idea with JSON)
from what I've gathered, you're supposed to use Utilities.JSONParse() for this data. I'm not sure what goes in the brackets to create a JSON object. I keep getting an invalid JSON string when my basic code runs;
function myFunction() {
var j = UrlFetchApp.fetch("https://api.trello.com/1/organizations/fogcreek?key=727f13bf79cfa362db49b79eb8c56c94");
Utilities.jsonParse(j);
}
So... examples/help on how to read JSON objects in a google spreadsheet would be great!
Thanks.
This is a Google Docs spreadsheet a very clever guy has created which imports from Trello using Google Apps script:
http://www.littlebluemonkey.com/blog/online-scrum-tools-part-4-trello-backup/
It takes the JSON data and translates it, so looking at his code may help you with twitter json import.
There's also another clever guy who explains how he's done something similar with Trello:
http://www.kevinpelgrims.com/blog/2012/03/05/project-progress-tracking-with-google-docs-and-trello/
I found this wonderful example of pulling data from a Google spreadsheet in JSON:
http://code.google.com/apis/gdata/samples/spreadsheet_sample.html
However, I can't seem to get it to work for a spreadsheet I created. I've made the doc public and published it, and tried every possible tweak on the key and sheet "name". Has anyone successfully used this? I've seen the Zend GData library, but would rather use JSON.
Thanks in advance for any tips.
I tried to work with the JSON feed a few months ago and I remember having to jiggle the handle a little to get the feed URL to work. I don't recall exactly what I did, but the bigger problem is that once you get it working the feed itself is kind of a mess.
I found that a much better solution (for my purposes, at least) was to use the CSV feed and then convert that to JSON on the server. I actually wrote a blog post outlining the steps a few weeks ago:
http://www.ravelrumba.com/blog/json-google-spreadsheets/
Google Spreadsheet as JSON can be done using Google Apps Script !
In Google Spreadsheet go to Tools > Scripts > Script Editor
Insert this code and hit the play button, use generated URL for generating JSON.
function getValues() {
var range = SpreadsheetApp.getActiveSheet().getDataRange();
var json = Utilities.jsonStringify(range.getValues())
Browser.msgBox(json);
}
also give it a try for Simple example of retrieving JSON feeds from Spreadsheets Data API