Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create an empty Google doc / Spreadsheet

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?

like image 901
dflorey Avatar asked Mar 02 '26 11:03

dflorey


1 Answers

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'
}
like image 108
Steve Bazyl Avatar answered Mar 06 '26 15:03

Steve Bazyl