Google Drive capability
How to export a Google Docs, Sheets or Slides file
Call files.export with a destination MIME type to convert a native Workspace file. From the editor, use File > Download to export a copy manually.
Documentation reviewed
Ways to do it
API
Drive API v3 files.export
Pass the file ID and a supported output MIME type, such as application/pdf.
- Requirements
- An authorized Drive OAuth token with content access and download permission.
- Limitations
- The response is limited to 10 MB of exported content.
Example
GET https://www.googleapis.com/drive/v3/files/FILE_ID/export?mimeType=application%2FpdfInterface
File > Download
Open the file in Docs, Sheets or Slides and choose a format from the Download menu.
- Requirements
- Access to the file in its editor and permission to download it.
- Limitations
- The editor offers formats supported by that file type. Google Docs Help recommends the browser’s Print to PDF option for a large document.