How To List Files from Google Drive into Google Sheets

ByDrive Explorer Team2025-02-25How-To

How To List Files from Google Drive into Google Sheets

When you need to create a structured inventory of files stored in Google Drive—for reporting, audits, or analysis—copying details manually becomes impractical as the number of files grows. A spreadsheet with file names, sizes, links, and modification dates makes it easier to search, filter, and share that information.

This guide covers three ways to list files from Google Drive into Google Sheets: manual export, Google Apps Script, and Drive Explorer Pro. Each method suits different skill levels and use cases.

Table of Contents

Prerequisites

To follow this guide, you will need:

  • A Google account with access to Google Drive and Google Sheets
  • A Google Sheets spreadsheet where you want the file list to appear
  • Optional: Admin rights to install add-ons from the Google Workspace Marketplace if using Drive Explorer Pro

Method 1 — Manually Copy File Details from Google Drive

You can manually copy file names and links from the Drive web interface into a spreadsheet when you only need a small set of files.

When To Use This Method

Use this method when:

  • You need to list fewer than 20–30 files
  • The list changes infrequently
  • You do not need metadata such as file size or last modified date

Step 1 — Open Google Drive and Select Files

Open Google Drive in your browser and navigate to the folder containing the files you want to list. Select the files by clicking the checkbox next to each file or by using Ctrl+Click (Windows) or Cmd+Click (Mac) to select multiple files.

Right-click one of the selected files and choose Get link or Share to generate a shareable link. Copy the link and paste it into a column in your Google Sheet. Repeat for each file, or use the Share dialog to copy links for multiple files when available.

Step 3 — Add File Names Manually

In an adjacent column, type or copy the file name for each row. Google Drive does not provide a bulk export of names and links in one step, so you will need to enter or copy each name individually.

Result

Your sheet will contain file names and links in separate columns. You can add more columns for notes or categories as needed.

Limitations

  • No automatic metadata such as file size, type, or last modified date
  • Time-consuming for more than a handful of files
  • No automatic refresh when files are added or removed in Drive

Method 2 — Use Google Apps Script to List Drive Files

Google Apps Script can read file metadata from Google Drive and write it into a spreadsheet. This approach works well when you need automation and have scripting experience.

When To Use This Method

Use this method when:

  • You need to list many files or entire folders
  • You want to schedule periodic updates
  • You are comfortable writing and maintaining script code

Step 1 — Create an Apps Script Project

Open your Google Sheet and go to Extensions → Apps Script. A new script project opens. Delete any default code and replace it with a function that uses the Drive API to list files.

Step 2 — Write the List Function

Use the DriveApp service to access folders and files. For example, to list files from a specific folder by ID:

function listDriveFiles() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var folderId = 'YOUR_FOLDER_ID_HERE'; // Replace with your folder ID
var folder = DriveApp.getFolderById(folderId);
var files = folder.getFiles();
var headers = ['File Name', 'File ID', 'Size (bytes)', 'Last Updated', 'URL'];
sheet.getRange(1, 1, 1, headers.length).setValues([headers]);
var row = 2;
while (files.hasNext()) {
var file = files.next();
sheet.getRange(row, 1).setValue(file.getName());
sheet.getRange(row, 2).setValue(file.getId());
sheet.getRange(row, 3).setValue(file.getSize());
sheet.getRange(row, 4).setValue(file.getLastUpdated());
sheet.getRange(row, 5).setValue(file.getUrl());
row++;
}
}

Replace YOUR_FOLDER_ID_HERE with the folder ID from the Drive URL (the long string after /folders/).

Step 3 — Run the Script and Grant Permissions

Click Run and select listDriveFiles. When prompted, review and grant the requested permissions. The script will populate your sheet with file metadata.

Result

The sheet will contain columns for file name, ID, size, last updated date, and URL. You can extend the script to add more attributes or filter by file type.

Limitations

  • Requires familiarity with JavaScript and the Apps Script environment
  • You must obtain and maintain folder IDs
  • Quota limits apply to Drive API calls
  • Debugging and maintenance fall on you

Method 3 — List Files Using Drive Explorer Pro

You can also use Drive Explorer Pro to list files from Google Drive into Google Sheets. This approach is useful when you need structured file data without writing scripts.

When To Use This Method

Use this method when:

  • You need to extract structured file data from Google Drive into Google Sheets
  • You prefer a point-and-click workflow over scripting
  • You want to choose which attributes (name, size, URL, type, etc.) appear in the sheet

Step 1 — Install Drive Explorer Pro from the Marketplace

  1. Open the Drive Explorer Pro Marketplace listing.
  2. Click Install.
  3. Review and accept the required permissions. Drive Explorer Pro needs access to Google Drive and Google Sheets to list files and update your spreadsheet.
  4. After installation, open any Google Sheet. Drive Explorer Pro will appear under the Extensions menu.

Step 2 — Launch Drive Explorer Pro

  1. Open your Google Sheet.
  2. Go to Extensions → Drive Explorer Pro → Open Drive Explorer Pro.
  3. The Drive Explorer Pro sidebar opens in the sheet. Your Google account is linked automatically once permissions are granted.

Step 3 — Configure Where to List Files

In the sidebar, choose where the file list will start in your sheet:

  • Currently Selected Cell — The list begins at the cell you have selected.
  • Append Below Existing Data — The list is added below any existing data.

Select the option that matches your layout.

Step 4 — Select File Attributes to Display

  1. Click Select Attributes (or the equivalent option in the List Files section).
  2. Choose the attributes you want in your sheet, such as:
    • File Name (plain text)
    • File Name linked to URL
    • File URL
    • File ID
    • File Type (Mime Type)
    • File Size (MB)
    • Direct Download Link
    • Image Preview (for image files)
  3. Optionally reorder attributes by dragging them. Click Save selected settings as Default if you want to reuse this configuration.

Step 5 — Select Files and List Them in the Sheet

  1. Click Select existing files from Drive and List in Sheets (or List Files) to open the Google Drive file picker.
  2. Navigate to the folder containing the files you want to list. If you have set a default folder, it opens by default.
  3. Select the desired files and click Select.
  4. The file details appear in your Google Sheet according to the attributes you chose.

Result

The sheet will contain rows with the selected metadata for each file—for example, file name, ID, size, type, and last modified date. You can then use filters, sorting, and formulas to analyze or share the data.

For more details on configuration and options, see the Drive Explorer Pro documentation.

Comparison of Methods

AspectManual CopyApps ScriptDrive Explorer Pro
Ease of useHigh for small listsLow; requires codingHigh; point-and-click
AutomationNoneFull; can be scheduledManual run per session
Metadata optionsLimitedFully customizableConfigurable attributes
ScalabilityPoor for many filesGoodGood
Setup timeMinimalModerate to highLow
Best forFew files, one-off listsTechnical users, automationNon-technical users, structured exports

Recommendation

  • If you need a quick list of a few files → Use the manual method.
  • If you need automated, recurring updates and can maintain a script → Use Google Apps Script.
  • If you need structured file data without scripting → Use Drive Explorer Pro.

Conclusion

Listing files from Google Drive into Google Sheets helps you turn scattered file storage into searchable, reportable data. Manual copying works for small lists, Apps Script suits automation needs, and Drive Explorer Pro provides a structured, no-code workflow for extracting file metadata into a spreadsheet. Choose the method that fits your volume, technical comfort, and how often you need to refresh the list.

Share this article