Blog
February 3, 2026

Google Sheets Import CSV: 5 Methods Compared (2026 Guide)

Five ways to import CSV files into Google Sheets—from manual upload to API automation. Includes limits, code examples, and troubleshooting.

15 mins read

Google Sheets Import CSV: 5 Methods Compared

You can import a CSV into Google Sheets by going to File > Import > Upload, selecting your file, and clicking "Import data." That handles 90% of use cases. But if you need auto-refreshing data, scheduled imports, or programmatic control, you have four other options worth knowing about.

This guide covers all five methods side-by-side: manual upload, Google Drive, the IMPORTDATA function, Apps Script automation, and the Google Sheets API. They each have different trade-offs. Some are dead simple but manual. Others are automated but take real setup work. Pick what fits.

Quick Comparison: All 5 Methods

Here is how the five methods stack up:

MethodDifficultyAuto-RefreshMax File SizeBest For
File > ImportEasyNo~100 MBOne-time imports, non-technical users
Drive Upload + Open WithEasyNo~100 MBQuick viewing, Drive-first workflows
IMPORTDATA FunctionEasyYes (~1 hr)2 MB / 50K cellsLive dashboards from public URLs
Apps ScriptMediumYes (triggers)Limited by 6-min runtimeRecurring imports, Gmail attachments
Sheets API (REST)HardYes (external cron)Batch-limitedBackend integrations, SaaS pipelines

Here is each one in detail.

Method 1: File > Import (Manual Upload)

This is the default approach. It works for any CSV file on your computer and takes about 30 seconds.

Steps

  1. Open Google Sheets (new or existing spreadsheet)
  2. Go to File > Import
  3. Click the Upload tab
  4. Click Browse and select your CSV file (or drag and drop it)
  5. Configure your import settings (see below)
  6. Click Import data

Import Location Options

Google Sheets gives you six choices for where to put the imported data:

  • Create new spreadsheet -- opens data in a brand-new file
  • Insert new sheet -- adds a new tab in the current spreadsheet
  • Replace spreadsheet -- wipes the entire file and replaces it
  • Replace current sheet -- overwrites only the active tab
  • Append to current sheet -- adds rows below existing data
  • Replace data at selected cell -- writes data starting from wherever your cursor is

For most imports, "Insert new sheet" is the safest choice -- it won't blow away anything you already have.

Separator Settings

Under "Separator type," you can choose:

  • Detect automatically (default -- works most of the time)
  • Comma, Tab, Semicolon, or Custom

If your CSV uses semicolons as delimiters (common in European exports where commas are decimal separators), auto-detect will probably get it wrong. Switch to "Semicolon" manually.

When to Use This Method

Use File > Import when you have a one-off CSV file and don't need the data to update automatically. It works on any device -- desktop, tablet, or phone.

The downside: every import is manual. If you're importing the same report every week, this gets old fast. Trust me.

Method 2: Google Drive Upload + Open With

If your CSV files already live in Google Drive (from email, shared folders, or other tools), you can skip the Sheets import dialog entirely.

Steps

  1. Upload your CSV to Google Drive (drag and drop or New > File upload)
  2. Right-click the CSV file in Drive
  3. Select Open with > Google Sheets

Google Sheets opens the file and parses it into rows and columns. Done.

Auto-Convert Setting

If you regularly upload CSV files to Drive, enable automatic conversion:

  1. In Google Drive, click the gear icon (Settings)
  2. Check "Convert uploads to Google Docs editor format"

With this on, every CSV you upload to Drive automatically becomes a Google Sheets file. Honestly, this is a nice time-saver if you deal with CSVs regularly.

Limitations

This method always creates a new spreadsheet. You cannot append data to an existing sheet or pick a specific tab. No control over delimiter detection either -- Google just guesses.

Use this when you need to quickly eyeball a CSV. Not great for anything more structured than that.

Method 3: IMPORTDATA Function

IMPORTDATA pulls CSV data directly from a URL into your spreadsheet. The big difference from the first two methods: it refreshes on its own.

Basic Syntax

In any cell, type:

=IMPORTDATA("https://example.com/data.csv")

The function fetches the CSV and fills the cells below and to the right. Google Sheets re-fetches it roughly once per hour. You cannot control the timing, which is annoying.

Using IMPORTDATA with Google Drive Files

Your CSV must be publicly accessible via URL. For files stored in Google Drive:

  1. Upload the CSV to Google Drive
  2. Right-click > Share > set to "Anyone with the link"
  3. Copy the file ID from the URL
  4. Use this URL format in IMPORTDATA:
=IMPORTDATA("https://drive.google.com/uc?export=download&id=YOUR_FILE_ID")

Replace YOUR_FILE_ID with the actual ID from your Drive link.

Combining with QUERY for Filtering

You can wrap IMPORTDATA in a QUERY function to filter or sort the imported data:

=QUERY(IMPORTDATA("https://example.com/data.csv"), "SELECT Col1, Col3 WHERE Col2 > 100")

This imports only specific columns and filters rows -- useful when you need a subset of a large CSV.

IMPORTDATA Limits

This function has hard limits that will bite you if you're not aware:

  • 50,000 cells maximum per IMPORTDATA call
  • 2 MB maximum file size
  • 50 IMPORT functions total per spreadsheet (this includes IMPORTHTML, IMPORTFEED, and IMPORTXML -- they all share the same pool)
  • ~1 hour refresh cache -- you cannot force a faster refresh

If your CSV has more than 50,000 cells or exceeds 2 MB, IMPORTDATA will fail silently or return partial data. This is frustrating because you get no error message -- it just quietly gives you incomplete results. For larger files, use Apps Script or the Sheets API instead.

When to Use IMPORTDATA

IMPORTDATA works well for dashboards that pull live data from a public endpoint. Set it up once and it keeps updating. The catch: your data source must be publicly accessible. For anything behind authentication, you need Method 4 or 5.

Method 4: Google Apps Script Automation

Apps Script lets you write JavaScript that runs inside Google Sheets. You can fetch CSV data from URLs, Google Drive, or even Gmail attachments -- and schedule it to run on its own. This is where things start to get genuinely useful if you're tired of manual imports.

Getting Started

  1. Open your Google Sheet
  2. Go to Extensions > Apps Script
  3. Delete the placeholder code and paste one of the examples below

Example: Import CSV from a URL

This script fetches a CSV from any URL and writes it to the active sheet:

function importCsvFromUrl() {
  const url = 'https://example.com/data.csv';
  const response = UrlFetchApp.fetch(url);
  const csvText = response.getContentText();
  const data = Utilities.parseCsv(csvText);

  const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  sheet.clearContents();
  sheet.getRange(1, 1, data.length, data[0].length).setValues(data);
}

Utilities.parseCsv() does the heavy lifting -- it splits the CSV text into a 2D array that setValues() writes directly to cells. Simple and it just works.

Example: Import CSV from Google Drive

This version reads a CSV file stored in your Google Drive:

function importCsvFromDrive() {
  const fileName = 'monthly-report.csv';
  const files = DriveApp.getFilesByName(fileName);

  if (!files.hasNext()) {
    Logger.log('File not found: ' + fileName);
    return;
  }

  const file = files.next();
  const csvText = file.getBlob().getDataAsString();
  const data = Utilities.parseCsv(csvText);

  const sheet = SpreadsheetApp.getActiveSpreadsheet()
    .getSheetByName('ImportedData') || SpreadsheetApp.getActiveSpreadsheet()
    .insertSheet('ImportedData');

  sheet.clearContents();
  sheet.getRange(1, 1, data.length, data[0].length).setValues(data);
}

Handling Large Files in Batches

The setValues() method gets slow with large data. For CSVs with tens of thousands of rows, write in batches or you'll probably hit a timeout:

function importLargeCsv() {
  const url = 'https://example.com/large-data.csv';
  const response = UrlFetchApp.fetch(url);
  const data = Utilities.parseCsv(response.getContentText());

  const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  sheet.clearContents();

  const batchSize = 10000;
  for (let i = 0; i < data.length; i += batchSize) {
    const batch = data.slice(i, i + batchSize);
    sheet.getRange(i + 1, 1, batch.length, batch[0].length).setValues(batch);
  }
}

Setting Up Automatic Triggers

To run your import on a schedule:

  1. In the Apps Script editor, click the clock icon (Triggers)
  2. Click + Add Trigger
  3. Choose your function, set the time-driven trigger (hourly, daily, weekly)
  4. Click Save

Now your CSV import runs on autopilot.

Apps Script Limits

Watch out for these limits:

  • 6-minute execution time limit on free Google accounts (30 minutes on Workspace). You'll hit this sooner than you'd expect with large files.
  • Large datasets may run out of memory before hitting the time limit
  • Debugging is painful -- you're stuck with Logger.log() and the Apps Script execution log. No breakpoints, no proper debugger.

For recurring CSV imports under 100K rows, Apps Script is the sweet spot. Beyond that, the Sheets API gives you more control. I haven't personally pushed Apps Script past ~200K rows, but other developers report it gets unreliable at that scale.

Method 5: Google Sheets API (Programmatic / REST)

The Sheets API is the most powerful option. You can import CSV data from any server, in any language, as part of any pipeline. It is also the most annoying to set up -- expect to spend 20-30 minutes on credentials alone the first time.

Two Approaches

  1. Drive API approach: Upload the CSV file with mimeType: 'text/csv' and auto-convert it to a Google Sheet. This creates a new spreadsheet from the CSV without writing any parsing logic.
  2. Sheets API approach: Create a blank spreadsheet (or use an existing one), parse the CSV yourself, then write values using spreadsheets.values.update().

The Drive API approach is simpler -- upload a CSV file and get a Sheet back. The Sheets API approach gives you control over exactly which sheet, which range, and how the data lands.

Setup: Service Account Credentials

  1. Go to Google Cloud Console
  2. Create a new project (or use existing)
  3. Enable the Google Sheets API and Google Drive API
  4. Go to Credentials > Create Credentials > Service Account
  5. Download the JSON key file
  6. Share your target Google Sheet with the service account email

Python Example with gspread

The gspread library simplifies Sheets API calls in Python:

import gspread
import csv

# Authenticate with service account
gc = gspread.service_account(filename='credentials.json')

# Open the target spreadsheet
spreadsheet = gc.open('My Import Sheet')
worksheet = spreadsheet.sheet1

# Read and parse the CSV
with open('data.csv', 'r') as f:
    reader = csv.reader(f)
    rows = list(reader)

# Clear existing data and write new data
worksheet.clear()
worksheet.update(range_name='A1', values=rows)

print(f'Imported {len(rows)} rows successfully.')

Node.js Example with googleapis

import { google } from 'googleapis';
import { readFileSync } from 'fs';
import { parse } from 'csv-parse/sync';

async function importCsvToSheets() {
  const auth = new google.auth.GoogleAuth({
    keyFile: 'credentials.json',
    scopes: ['https://www.googleapis.com/auth/spreadsheets'],
  });

  const sheets = google.sheets({ version: 'v4', auth });
  const spreadsheetId = 'YOUR_SPREADSHEET_ID';

  // Parse CSV file
  const csvContent = readFileSync('data.csv', 'utf-8');
  const rows = parse(csvContent);

  // Clear and write data
  await sheets.spreadsheets.values.clear({
    spreadsheetId,
    range: 'Sheet1',
  });

  await sheets.spreadsheets.values.update({
    spreadsheetId,
    range: 'Sheet1!A1',
    valueInputOption: 'RAW',
    requestBody: { values: rows },
  });

  console.log(`Imported ${rows.length} rows.`);
}

importCsvToSheets();

API Rate Limits

The Google Sheets API enforces these rate limits:

  • 100 requests per 100 seconds per user
  • 500 requests per 100 seconds per project

For large imports, batch your writes and add retry logic with exponential backoff. You'll get a 429 error when you hit the limit -- don't just retry immediately or you'll make it worse.

When to Use the API

Use the Sheets API when your data comes from outside Google's world -- your database, a third-party service, a CI/CD pipeline. It is the only method that works from a server without user interaction (via service accounts).

Building a product that pushes data into Google Sheets? The API is your only real option. Everything else requires a human clicking buttons.

Google Sheets Limits You Should Know

These are the limits that actually matter when importing large CSVs:

LimitValue
Maximum cells per spreadsheet10,000,000
Maximum columns18,278 (column ZZZ)
Characters per cell50,000
CSV upload file size (practical)~100 MB
IMPORTDATA max cells50,000
IMPORTDATA max file size2 MB
IMPORT functions per spreadsheet50
Apps Script execution (free)6 minutes
Apps Script execution (Workspace)30 minutes
Sheets API rate (per user)100 req / 100 sec
Performance degradation threshold~100,000 rows

The 10 million cell limit is the hard ceiling. With 26 columns, that gives you roughly 384,615 rows. If you need more, look at BigQuery with Connected Sheets instead.

But here's the thing -- performance starts degrading well before you hit that ceiling. Around 100,000 rows, formulas slow down, scrolling lags, and collaborative editing gets painful. If your CSV regularly exceeds 100K rows, Google Sheets is probably the wrong tool for the job.

Troubleshooting Common Import Issues

Garbled Characters (Encoding Problems)

Symptom: Accented letters, currency symbols, or special characters show up as gibberish (e.g., "café" becomes "café").

Fix: Re-save the CSV as UTF-8 before importing. In most text editors: File > Save As > Encoding > UTF-8. Google Sheets expects UTF-8 and will mangle files saved with Windows-1252 or ISO-8859-1 encoding. This is by far the most common import headache.

Wrong Delimiter Detected

Symptom: All data appears in a single column instead of splitting into multiple columns.

Fix: During File > Import, change the separator type from "Detect automatically" to the correct delimiter (semicolon, tab, etc.). Already imported? Select the column and use Data > Split text to columns to fix it after the fact. Not ideal, but it works.

Leading Zeros Stripped

Symptom: ZIP codes like "00501" become "501". Product codes like "007" become "7".

Fix: Format the target column as Plain Text before importing. Select the column, go to Format > Number > Plain Text. You have to do this before the import -- once Sheets strips the zeros, they're gone. Alternatively, prepend an apostrophe to numeric values in the CSV file itself (e.g., '00501), which forces text treatment.

Dates Parsed Incorrectly

Symptom: "01/02/2026" imports as January 2nd when you meant February 1st (or vice versa).

Fix: Set your spreadsheet locale before importing. Go to File > Settings > Locale and choose the locale matching your date format. US locale expects MM/DD/YYYY; most European locales expect DD/MM/YYYY.

FAQ

Can I import multiple CSV files at once?

Not through the UI -- you have to import one file at a time. It's tedious. Apps Script can loop through multiple files in a Drive folder and import them all into separate sheets though. The Sheets API can also handle batch imports from your server.

How do I auto-refresh imported CSV data?

Use IMPORTDATA for automatic refreshes (approximately hourly). For more control, set up an Apps Script with a time-driven trigger to run your import function on a custom schedule -- every hour, daily, or weekly.

What is the maximum CSV file size for Google Sheets?

Around 100 MB for manual imports. IMPORTDATA caps at 2 MB (much smaller than most people expect). For the Sheets API, there is no strict file size limit, but you're bound by the 10 million cell limit per spreadsheet and API rate limits.

How do I import a CSV on mobile?

On Android or iOS, open the Google Sheets app, tap the + button, then Import. You can browse your device files or Google Drive. It supports the same CSV formats as desktop but gives you fewer options. The mobile experience is clunky, honestly -- if you can wait until you're at a computer, do that.

Can I import CSV data behind authentication?

IMPORTDATA only works with publicly accessible URLs. For authenticated sources, use Apps Script with UrlFetchApp.fetch() (which supports custom headers and OAuth tokens) or the Sheets API from your own server where you control the authentication flow.

Wrapping Up

Quick one-time import? File > Import. Auto-refreshing from a public URL? IMPORTDATA. Scheduled automation inside Google? Apps Script. Full programmatic control? The Sheets API.

Most people start with Method 1 and never need anything else. That's fine. But when you hit the wall -- the same manual import for the fifth week in a row, data that needs to stay fresh, files bigger than IMPORTDATA's tiny 2 MB limit -- the other methods are worth the setup time.

If you are building an application that needs to let users import CSV files (into your database, not just into Sheets), that is a different problem entirely. ImportCSV handles CSV validation, column mapping, and large file uploads out of the box so you do not have to build it yourself.

Wrap-up

CSV imports shouldn't slow you down. ImportCSV aims to expand into your workflow — whether you're building data import flows, handling customer uploads, or processing large datasets.

If that sounds like the kind of tooling you want to use, try ImportCSV .