3

What is the best way to create an empty Google doc / spreadsheet? I am using the GData docs / spreadsheet api right now but I'd prefer to use the Drive API. Is there a mimetype that will create an empty Google Doc/Google Spreadsheet?

2

1 Answer 1

5

As Claudio mentioned in the comment, you can see the list of the supported MIME types in the other question. In practice, its very easy to create a blank doc. For example:

POST https://www.googleapis.com/drive/v2/files

{
'title' : 'My new document',
'mimeType':'application/vnd.google-apps.document'
}
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! I had to add 'Content-Type: application/json' http header in the request. Otherwise I got '400 Bad Request - parse error'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.