What I'd like to accomplish: Download a Google Docs doc (with Google Drive API), modify it (for example highlight some text), then store it back to Google Drive (not messing up the format, so that it can be edited in the Google Docs app).
(Preemptive research: I know that you can do some integration with Google's hosted AppScript, but I want to do this offline. I also know that a Google Docs doc can be exported to other formats, but I see no sign of reimporting in the Google Drive API.)
I'm not hopeful this can be done:
* The meta-data file (that you can get via the Google Drive API) lacks a "downloadUrl" attribute
* In offline mode, the data (stored in .../File System/) is binary and the Unix "file " command doesn't know what format it is.
Is this off-limits with the current Google Drive API?
Your best (only) approach is to export the doc to a format that you can edit locally (html, docs, etc) and then reimport it. HTML is of course the easiest, but also the most lossy.
Related
I've been doing some research to find out which API dropbox is using to edit docs, sheets, and slides using google doc editors inside its own application. I've looked at Google Docs API, Google Drive API, and Google App Scripts I still don't have a clear answer.
From the looks of it files are uploaded to Dropbox, then can be opened in Google's editors and they are saved back to dropbox after editing. These files don't show in my google drive so I am assuming they are not being saved by Google.
These API are correct. It's your assumption that is wrongful. Dropbox may act as a Drive application and these files are outside of your reach, nevertheless still within your Drive.
Here it's explained: store application-specific data.
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.
I am uploading Word documents to Google Drive using the Google SDK. I can view these files once uploaded through the Google Drive interface, but to edit these documents I need to selected "Open with Google Docs". When I do this, Google makes another version of the file and saves it to my Google Drive.
I want to automatically create a URL for users to click on once their file has been uploaded, so I presume I somehow need to convert the uploaded file (Word Document) to a Google Docs file so a user can then edit it and save it. Is this possible?
You need to send the optional query parameter of convert
convert (boolean) Whether to convert this file to the corresponding
Google Docs format. (Default: false)
Documentation for Google Drive Insert
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.
Is it possible to send data from the JavaScript to the Google Drive . I am trying to send my local storage datas to the google drive.
Kindly suggest me a solution for the same.
The Google Drive SDK documentation includes a complete JavaScript quickstart guide that shows how to upload a file to Drive from JavaScript:
https://developers.google.com/drive/quickstart
It should be pretty straightforward to edit the sample code to use local storage instead of the file uploaded from a form.