Free Drive CSV to Sheets Import

How to automatically import CSV files from Google Drive into Google Sheets (free)

A tool exports a CSV every day, and it ends up in a Google Drive folder: a sync app, a teammate, or you saving downloads there. Getting it into a Google Sheet means opening each file, copying, and pasting below yesterday’s rows.

IMPORTDATA doesn’t help: it needs a public URL, and files in your Drive aren’t public. This guide sets up a free script that watches the folder and imports each new file for you. It uses Drive CSV to Sheets, a free, MIT-licensed Apps Script.

Step 1: Add the script

  1. Open the Google Sheet the data should go into and click the tab it should fill.
  2. Extensions → Apps Script. Replace the contents of Code.gs with this Code.gs and click Save.
  3. Reload the sheet. A 📂 Folder Import menu appears.

Step 2: Point it at the folder

  1. Open the Drive folder in another tab and copy the link from the address bar.
  2. In the sheet: 📂 Folder Import → Set Up Import…, and paste the link.
  3. Choose:
    • Append (Yes): every file’s rows go below the previous ones. If a file starts with the same header row as your sheet, that header is skipped, so you get one clean table. Best for daily sales, transactions or logs.
    • Replace (No): the tab is cleared and shows only the newest file. Best for a “current stock” or “latest report” tab.
  4. Approve Google’s permission prompt (“Google hasn’t verified this app” → Advanced → Go to (your project name) → Allow). It’s your own script, running in your account.

Whatever is in the folder is imported right away. Imported files move into an Imported subfolder, so they’re never imported twice. After that it checks every hour.

Step 3 (optional): Excel files

If the files are .xlsx or .xls, turn on one built-in service: in the Apps Script editor click + next to Services, pick Drive API, and click Add. Excel files are then converted and the first tab imported. Without it, they’re skipped and left in the folder.

Tips

FAQ

How often does it run? Every hour. Use Import Now from the menu for an immediate run.

Does my computer need to be on? No. It runs on Google’s servers.

Does it handle big files? CSVs with tens of thousands of rows are fine. Google Sheets has a 10 million cell limit per spreadsheet, so in Append mode, archive old rows now and then.

How do I stop it? 📂 Folder Import → Turn Off.


Get the script on GitHub · More free Google Sheets scripts