Export a document editor files such document, Spreadsheets, Drawings, Presentations, Apps Scripts to common file formats as defined in this link https://developers.google.com/drive/api/guides/ref-export-formats
[API Help]
Parameter |
Label |
Required |
Options |
Description |
Id |
File Id |
YES |
|
Id of a file you want to export and file must be editor type (e.g. document, Spreadsheets, Drawings, Presentations, Apps Scripts)
|
ExportAs |
Export As (Mime Type) |
YES |
Option |
Value |
None |
|
Export to PDF |
application/pdf |
Export to HTML |
text/html |
Export to HTML (zipped) |
application/zip |
Export to Plain text |
text/plain |
Export to Rich text |
application/rtf |
Export to Open Office doc |
application/vnd.oasis.opendocument.text |
Export to MS Word document |
application/vnd.openxmlformats-officedocument.wordprocessingml.document |
Export to EPUB |
application/epub+zip |
Export to MS Excel |
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
Export to Open Office sheet |
application/x-vnd.oasis.opendocument.spreadsheet |
Export to (sheet only) |
text/tab-separated-values |
Export to JPEG |
image/jpeg |
Export to PNG |
image/png |
Export to SVG |
image/svg+xml |
Export to MS PowerPoint |
application/vnd.openxmlformats-officedocument.presentationml.presentation |
Export to Open Office presentation |
application/vnd.oasis.opendocument.presentation |
Export to JSON |
application/vnd.google-apps.script+json |
|
The MIME type of the format requested for this export. [API Help..]
|
fields |
fields |
NO |
|
fields
|
DriveId |
Shared DriveId |
NO |
|
By default file lists from MyDrive but if you like to search other Shared drive (formally known as Team drive) then set this parameter.
|
DriveType |
Drive Type |
YES |
Option |
Value |
My Drive |
user |
Shared Drive |
drive |
|
Default search context is User's drive. Bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain', 'drive', and 'allDrives'. Prefer 'user' or 'drive' to 'allDrives' for efficiency. By default, corpora is set to 'user'. However, this can change depending on the filter set through the 'Query' parameter.
|
SupportsAllDrives |
Supports all drives (e.g. My and Shared) |
NO |
Option |
Value |
true |
true |
false |
false |
|
Whether the requesting application supports both My Drives and shared drives.
|