How to List Files from Google Drive into Google Sheets

ByContent Team2026-06-11How-To

Google Drive stores your files, but it does not give you a spreadsheet-style list you can filter, sort, or share with your team.

To list files from Google Drive in Google Sheets, use Drive Explorer Pro. Open the add-on inside your sheet, pick files from Google Drive, and it adds each file's name, link, size, and other details as rows — no coding required.

In this guide, you will walk through the Drive Explorer Pro workflow step by step. There is also an optional Google Apps Script method at the end if you need scheduled automation.

Table of Contents

Video Tutorial

Prerequisites

Before you start, make sure you have:

If you only need to link one or two files, see how to link a Google Drive file to Google Sheets first. This guide is for building a full file list in rows.

Listing Files with Drive Explorer Pro

Drive Explorer Pro is a Google Sheets add-on that lists Drive files through a sidebar. You pick files in Google Drive, choose which details appear as columns, and add one row per file.

When to use: You want a file inventory in Google Sheets without writing code.

Why use Drive Explorer Pro

  • List many files at once from a Drive file picker.
  • Choose which columns to add: file name, URL, direct download link, size, MIME type, file ID, and more.
  • Set file access before listing so shared links work when you send the sheet.

Install Drive Explorer Pro from the Google Workspace Marketplace:

Launching Drive Explorer Pro

  1. Open the Google Sheets spreadsheet where you want the file list.

  2. Click ExtensionsDrive Explorer ProOpen Drive Explorer Pro.

    Google Sheets Extensions menu showing Drive Explorer Pro with the Open Drive explorer option highlighted

The sidebar opens on the right side of your sheet.

Configuring What Gets Listed (One-Time Setup)

Before you list files, set up the List Files tab once. Drive Explorer Pro can reuse these settings on the next run.

  1. Open the List Files tab in the sidebar.

  2. Under Start listing file from, choose:

    • Currently Selected Cell for a new list starting at your cursor, or
    • Append Below Existing Data to add new rows without overwriting old ones.
  3. Under Select File Attributes to List, check the columns you want. Common choices:

    • File Name Linked to URL — clickable file name
    • File URL — standard Google Drive link
    • Direct Download Link — link that starts a download (see how direct download links work)
    • File Size (MB)
    • Mime Type
    • File ID
    • Image Preview — thumbnail for image files
  4. Drag attributes to set column order, then click Save Selected Settings as Default.

    Drive Explorer Pro sidebar showing the List Files tab with listing position options and file attribute checkboxes

In the Settings tab, set File Access to Anyone with the link if people opening the sheet should also be able to open the listed files. Sharing the spreadsheet does not share the Drive files automatically.

Selecting Files and Building the List

  1. Go back to the List Files tab.
  2. Click Select existing files from Drive and List in Sheets.
  3. Browse to your folder and select the files. Hold Ctrl on Windows or Command on Mac to select multiple files.
  4. Click Select and wait until all rows appear. Do not close the sidebar while the list is being built.

Result: Each file appears on its own row with the columns you selected.

Google Sheet populated by Drive Explorer Pro showing file names, image previews, download links, file URLs, IDs, MIME types, and file sizes in columns

Click a link in the sheet to confirm it opens the file in Google Drive.

To refresh the list later, use Append Below Existing Data so new files are added without deleting existing rows.

Listing Files with Google Apps Script (Optional)

If you need a scheduled or fully custom workflow, you can list files with Google Apps Script instead. This method requires editing a short script and does not use Drive Explorer Pro.

When to use: You want automation on a timer or need to modify the script for a specific folder ID.

Opening the Apps Script Editor

  1. Open the Google Sheets spreadsheet where you want the file list.

  2. Click ExtensionsApps Script.

    Google Sheets Extensions menu open with Apps Script highlighted

The Apps Script editor opens in a new browser tab.

Pasting and Configuring the Script

  1. Delete the placeholder code in the editor.
  2. Paste this script:
function listDriveFiles() {
// Replace with your folder ID from the folder URL:
// https://drive.google.com/drive/folders/FOLDER_ID
const folderId = 'FOLDER_ID';
const folder = DriveApp.getFolderById(folderId);
const files = folder.getFiles();
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.clear();
sheet.appendRow(['File Name', 'File ID', 'File URL', 'File Size (MB)', 'Last Modified']);
const rows = [];
while (files.hasNext()) {
const file = files.next();
rows.push([
file.getName(),
file.getId(),
file.getUrl(),
(file.getSize() / (1024 * 1024)).toFixed(2),
file.getLastUpdated()
]);
}
if (rows.length > 0) {
sheet.getRange(2, 1, rows.length, rows[0].length).setValues(rows);
}
}
  1. Replace FOLDER_ID with the ID from your folder URL in Google Drive.
  2. Click Save and name the project.

The script lists every file directly inside that folder (not subfolders) and writes one row per file.

Note: getSize() returns 0 for native Google files such as Docs, Sheets, and Slides. Uploaded files such as PDFs, images, and videos show their size in megabytes.

Running the Script

  1. In the Apps Script editor, click Run.
  2. Choose your Google account and click Allow when Google asks for Drive and Sheets access.
  3. Return to your spreadsheet and confirm the columns are filled: file name, ID, URL, size, and last modified date.

Result: Your sheet holds a structured Drive file list you can filter, sort, or export.

To run the list on a schedule, add a time-driven trigger in Apps Script.

Limitation: This sample script does not list subfolders or extra fields such as MIME type. Extend the script if you need those.

Choosing the Right Method

Drive Explorer ProApps Script
Best forListing files in a few clicks, no codeScheduled or automated inventories
Coding requiredNoYes — paste and edit a short script
Pick files in a visual pickerYesNo
Custom columns (download link, preview, MIME type)Yes — checkboxes in the sidebarRequires script changes
List subfoldersSelect files from multiple folders in the pickerRequires script changes
  • Use Drive Explorer Pro for most file inventory workflows inside Google Sheets.
  • Use Apps Script only when you need a scheduled audit or full control over the code.

If you also need to upload new files and log their links, see how to upload files to Google Drive and share a link. If you are building a photo or image catalog, see how to mass upload images in Google Sheets.

Building inventory or procurement trackers in Sheets? Pair your file list with PDFs these tools generate:

Conclusion

Drive Explorer Pro is the fastest way to list Google Drive files in Google Sheets — pick your files, choose your columns, and build a searchable inventory in rows.

  • Use Drive Explorer Pro when you want names, links, sizes, and previews without code.
  • Use Apps Script when you need scheduled automation and are comfortable editing a script.

Before sharing the sheet, confirm file access on the listed files. If a file is still Restricted, people may see Request access even when the link is in your spreadsheet.

Share this article