0
votes

I'm trying to add a new Spreadsheet to Google Drive, using the Google Drive Api.I don't know which feed to use to add the spreadsheet. To add a new Worksheet to an existing Spreadsheet, my WorksheetFeed is:

 WorksheetFeed = spreadsheet.Worksheets;

So, to add a new Spreadsheet to Google Drive, which feed i was supposed to use? In the sample, is used DocumentsListQuery.documentsBaseUri, but when I try to use that feed, I recieve the error: Execution of request failed: https://docs.google.com/feeds/default/private/full

1

1 Answers

0
votes

Here is how to do it with the http api:

  • post url: "https://www.googleapis.com/drive/v2/files"
  • post data must contain at least: 'mimeType': 'application/vnd.google-apps.spreadsheet', 'title': 'hello spreadsheet'
  • response.data.id gives you the new spreadsheet id.

Note that currently this will create a regular (old) sheet, not the "new sheets" that Google released recently.