Turning a Google Spreadsheet into a JSON feed - json

I wish to firstly turn a Google Spreadsheet into a JSON feed, there are plenty of posts online for this but none seem to work, it is fully shared and public. I think the structure of the URL may have changed that is causing this not to work.
This is the file I wish to read as JSON
https://docs.google.com/spreadsheets/d/195boU7gqGLh_q2RXgnwfFVidfEn-YXakBhC4A--lej0/edit?usp=sharing
This is what I have based on https://ctrlq.org/code/20004-google-spreadsheets-json
https://spreadsheets.google.com/feeds/list/195boU7gqGLh_q2RXgnwfFVidfEn-YXakBhC4A--lej0/od6/public/basic?alt=json
Secondly, I would like this Google spreadsheet to be able to be updated from a 3rd party CSV or XML file located an another URL. Is this possible?

I found another tutorial about your problem.
Just make sure you follow the step 1 here, that in your Google Spreadsheet,click the "share" button and choose the "Anyone on the internet can find and view". Also you need to publish the entire sheet in order to this. Go to "File", "Publish to the web…" and publish the entire spreadsheet.
You can also try the solution in this SO question.
https://spreadsheets.google.com/feeds/worksheets/195boU7gqGLh_q2RXgnwfFVidfEn-YXakBhC4A--lej0/private/full?alt=json
Another workaround is by using Google AppScript. Here is the tutorial on how to do it by using AppScript.

Related

Do Google Apps Scripts have a Copy URL?

I'm wondering if there is a way to share a link to a Google Apps Script file that forces users to make a copy of it? Using Google Docs, you can append /copy to the url. For example:
https://docs.google.com/document/d/19yoQ71RcqNsYgPmZHzw96G_QH05hC20sWxk_ktahpXY/copy
This will force users to make a copy of the original document. I've been trying to do something similiar with a Google Apps Script file.
I've tried appending copy to the URL like this but it doesn't seem to work. As a potential work around, I could just use embedded scripts and share the Sheet/Doc/Form.
Anyone know of a URL parameter to force copying of a Google Apps Script file?
You can use this format to quickly make a copy of any public Google Script.
https://script.google.com/d/SCRIPT_ID/edit?newcopy=true
See example.
There is no way to do this since the new editor has been rolled, have reported it on this issue:
https://issuetracker.google.com/issues/198266388
You can manually make a copy on the new editor by going to the "Overview" tab, and on the top-right is the button to make a copy.

Synchronizing data between Google Sheets and MS Excel using Google Drive API

I open MS-Word file in Google Document and edit it. But changes wasn't reflected to original MS-Word file. Please tell me how to fix this. Is there any way through API?
I really liked your question, see if this helps :
you need to edit the file using the following two options
Edit the file using Office Compatibility Mode (OCM)
Convert the file to Google Docs, Sheets, or Slides.
For using the Office Compatibility Mode (OCM), do the following
Go to :
https://chrome.google.com/webstore/category/apps
Go to the Extensions "Menu"
Search for --> Office
Install the " Office Editing for Docs, Sheets & Slides" extension
Now go to Google Drive, there go to the settings
and uncheck the Convert Upload option
(Convert uploaded files to Google Docs editor format)
However if the doc is heavily formated, this may not be
a good way to edit it.
Ref: See the link below
https://www.youtube.com/watch?v=odjJBYpJmxs
I am sorry i didn't see the last part of your question where you have asked for API. I have not done this before ...
however ever when i check in the web,,i didn;t see any API like Google Docs API, I can see the Google Sheets and Google Slides API though in the RESTful APIs that Google is providing.
So Maybe can redesigning you app a little using Google Picker of Google Drive API, may help OR use the paid Google Apps for work https://apps.google.com/products/docs/
Some one else , in this forum may reply with better answer.

Google Realtime API with Google Docs

I would like to build an application on a webpage, that does as google docs:
I want to build an app that allow people to work on a document in collaboration
I start with this: https://developers.google.com/drive/realtime/realtime-quickstart
But the problem is that it creates a file with the mimetype is "application/vnd.google-apps.drive-sdk".
I would like to work with google docs format, so people can open them with their google drive and edit their later.
The file created is not the proper format, and find it me impossible to open it.
( I try to edit the mimetype with "application/vnd.google-apps.document", however it creates the file in the google drive but it can't find the file when it try to load it).
How to create a google doc in realtime ? (If you can post the code here, it would help me a lot)
Then, it want to add the toolbar for editing(bold, italic,...).
After that, it would like to add the google picker to select the file to load.

Use a Google Docs Spreadsheet as a datasource for a dynamic Google Sites webpage

I have a Google Form that feeds a Google Docs Spreadsheet. I'd like to--in turn--have that Google Docs Spreadsheet feed a webpage.
In plainer English, babysitters fill out the form to sign up to be in our community's Babysitter Directory. The spreadsheet houses all of the data. I'd like to code a webpage to pull selected bits of the data for the online directory.
I've tried doing a separate sheet in the spreadsheet, using a QUERY to select the columns that I want to include (and the order in which I want to include them), publishing that sheet to the web, then embedding that sheet into the webpage in an iFrame. And that works.
But even with the QUERY, there are SO many columns that users need to scroll WAY over to the right to see all the data for each babysitter. It's unwieldy.
What would be way better would be if I could break the data for each entry over multiple lines and do some nice formatting for a directory, rather than just a linear spreadsheet. So that, essentially, each babysitter's "entry" in the directory is more than 1 line long. Does that make sense?
If I was working in Office, I would know exactly what to do: use the Excel spreadsheet as the datasource for a Word Mail Merge and I would put move the fields around on the page to make it all look good.
And, to be sure, if I can do this in a Google Doc, then embed the Doc into the webpage, that's fine, too. But I would think there's some way I can do it directly in the Google Site?
Can I?
If anybody has even just a reference page for me to take a look at, I'd appreciate it.
Thanks!
Are you trying to do this in Google Sites? If so, you can embed the entire spreadsheet on the page, but if you only want certain columns, you can try inserting an Apps Script widget on the page.
You need to know how to write a Google Apps Script that will run JS functions and render HTML, here is a tutorial
To create the Script that can run on your page, go to:
More > Manage site > Apps Script > Add new script
Here's also a link to how to interact with Spreadsheet data.
What you want to do is more or less a database interface that uses a spreadsheet as 'data holder', depending on your programming skills it can be quite easy or very hard...
Here is an example of such a webapp, its has probably too many fields and features but the general idea is the same (a quick search tool and a window to show results).
It that what you had in mind ?
If so I can share the code to help you to get started but if you are not familiar with javascript it will probably need too much effort to get through.

How can I upload a dynamically created Google Apps Script?

I want to create a script dynamically and then upload it as a Google Apps Script.
When I try this, either
If I set the mime type correctly the link looks good, but doesn't work (file not found).
If I create a text file, that is just what it is - a text file, not a script file.
Do I need to wrap my code in an extra layer so that the editor can work with it?
Thanks
Michael
There's a way I've seen people implement something like this, but do so at your own peril: UrlFetchApp and eval(). You end up having to host the script somewhere else, pulling it back, and hitting eval() on the script somewhere. You may be able to do this via Google Drive sync and the DocList API.
An Apps Script API within Apps Script is something we've heard feedback for and are talking about, FWIW, but don't let this block you from getting what you need done in the meantime.