Search code examples
google-drive-apigoogle-docs-api

Is it possible to covert Word docs to a Google Doc?


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?


Solution

  • 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