Create a Document Using the Google Drive Component


Google Drive documents can be created programmatically using the Google Drive component by specifying the appropriate Google document MIME type during upload.

To create a new document in Google Drive, use the UploadFile method of the Google Drive component. The document type is determined by the Google Drive MIME type passed to the method.

For example, below is some sample code to create a new Google Sheet:

// C#
gdrive1.UploadFile("New Spreadsheet Name", "application/vnd.google-apps.spreadsheet");

Some other popular Google document MIME types are:

  • application/vnd.google-apps.document
  • application/vnd.google-apps.drawing
  • application/vnd.google-apps.form
  • application/vnd.google-apps.kix
  • application/vnd.google-apps.presentation
  • application/vnd.google-apps.script
  • application/vnd.google-apps.spreadsheet

These MIME types allow you to create different types of Google Drive documents directly from your application.

We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@nsoftware.com.