GDrive File Link Formats (GSheets, GDocs, GSlides)

  • 26 June 2023
  • 1 reply
  • 452 views

Userlevel 7
Badge +14

GDrive File Link Formats (GDocs, GSheets, GSlides)

 

Handy ways to format GDrive file links for different use cases.

 

Try this Tool: https://sites.google.com/site/gdocs2direct/

 

GDrive Files - Download and Export

The native file viewer is useful but sometimes you may want to bypass the built-in GDrive viewer and force the browser to download the file instead of opening it.

GDrive Files - Direct Download Links to Skip the Web Viewer

When you upload any file in GDrive and share it, the shared link looks like this:

https://drive.google.com/open?id=DRIVE_FILE_ID

The FILE_ID is unique for every file in GDrive.

If you copy this FILE_ID and use it in the URL below, you’ll get a direct link to download the file from GDrive.

https://drive.google.com/uc?export=download&id=DRIVE_FILE_ID

If you wish to open the file in the GDrive web viewer, the viewer URL would be:

https://drive.google.com/file/d/DRIVE_FILE_ID/view

 

GDocs - Direct Downloads

Any GDoc in your GDrive has a URL like:

https://docs.google.com/document/d/DOC_FILE_ID/edit

Replace /edit with /export?format=, add the file format that the GDoc should be saved as and your download link is ready.

https://docs.google.com/document/d/DOC_FILE_ID/export?format=pdf
https://docs.google.com/document/d/DOC_FILE_ID/export?format=doc
https://docs.google.com/document/d/DOC_FILE_ID/export?format=txt
https://docs.google.com/document/d/DOC_FILE_ID/export?format=html
https://docs.google.com/document/d/DOC_FILE_ID/export?format=odt
https://docs.google.com/document/d/DOC_FILE_ID/export?format=epub
  • pdf
  • doc
  • txt
  • html
  • odt: OpenDocument
  • epub: for downloading the GDoc as an ebook

 

Open your GSheet in GDrive, make the sheet Public (or share with Anyone with a link) and make a note of the shared URL. It should be something like this:

https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit

The direct download links for GSheets are similar to GDocs and the sheets can be exported as:

https://docs.google.com/spreadsheets/d/FILE_ID/export?format=xlsx
https://docs.google.com/spreadsheets/d/FILE_ID/export?format=pdf
https://docs.google.com/spreadsheets/d/FILE_ID/export?format=csv
  • xlsx: Microsoft Excel
  • pdf: PDF
  • csv: CSV

 

The URLs of GSlide presentations in GDrive have this format:

https://docs.google.com/presentation/d/PRESENTATION_ID/edit


Replace /edit with /export/format where format can be:

https://docs.google.com/presentation/d/PRESENTATION_ID/export/pdf
https://docs.google.com/presentation/d/PRESENTATION_ID/export/pptx
https://docs.google.com/presentation/d/PRESENTATION_ID/export/png
  • pptx: for downloading GSlides as Microsoft Powerpoint files
  • pdf: for exporting the presentation as a PDF slideshow
  • png: for exporting as PNG format

 

GSlides - Download as PNG Files

You can create links to individual slides that will download the slide as a high-res PNG file.

All you need to do is add ?pageid=pPAGE_NUMBER to the export url.


Want to download the 5th slide as a PNG file?
The URL would be:

https://docs.google.com/presentation/d/FILE_ID/export/png?pageid=p5

 

GDrive - Web Viewer

GDrive includes a built-in web viewer so people can view your shared files directly in their browser.
You can use this web viewer to view online files without having to download the files to your computer.

https://docs.google.com/viewer?url=FILE_URL

Replace FILE_URL with the full http link of the online file and anyone can view your file in the browser itself.

 

GDrive Files - Reader Mode

You can view native GDrive files in reader mode (sans the Google UI) by simply replace /edit in the GDrive file URL with /preview.

So if the original share link of a GDrive file is:

https://docs.google.com/spreadsheets/d/SHEET_ID/edit

You can view the same GDrive file in a clean, reader mode using the link:

https://docs.google.com/spreadsheets/d/SHEET_ID/preview

 

GDrive Files - Copy and make a shared file your own

Replace /edit with /copy in the URL of any native GDrive file and anyone can click that link to quickly make a copy of that file in their own GDrive.

Link - Original:
https://docs.google.com/document/d/FILE_ID/edit

Link - Copy:
https://docs.google.com/document/d/FILE_ID/copy

The /copy URL trick works for:

  • GDocs
  • GSheets
  • GSlides

Add ?copyComments=true if you would like the copied file to include the comments from the original file.

Set includeResolvedCommentsOnCopy=false to skip copying resolved comments and copyCollaborators=false to not share the copied file with the original collaborators.

You can use it for GForms as well but the form will be copied to another user’s Google Account only if the form owner has granted access to the form.

 

GDrive Files - Embed in Web Pages

The /preview is useful when you need to embed a GDoc, GSheet or GSlide from GDrive in your web page using the tag: IFRAME

 <iframe src="https://docs.google.com/document/d/FILE_ID/preview" height="600px" width=“800px" allowfullscreen>
</iframe>

 

GDrive Files - Invite users when copying files

If you add ?userstoinvite=email@domain.com to the copy URL, the Google user who is copying the GDrive file will be prompted to share the file with the specific Google account immediately after copying the file.

https://docs.google.com/document/d/FILE_ID/copy?userstoinvite=emailaddress


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 1
Badge +1

Great Info!