How to Upload CSV to Google Sheets

Uploading CSV files to Google Sheets is a common task when working with data. Whether you need to analyze survey results, import customer information, or process financial data, Google Sheets offers several methods to import CSV files efficiently.

What is a CSV file?

CSV (Comma-Separated Values) files store tabular data in plain text. Each line represents a row of data, with columns separated by commas. CSV files are popular because they're simple and compatible with most data processing tools.

You can view and explore CSV files directly in your browser before uploading them to Google Sheets.

Method 1: Direct upload from your computer

The simplest way to upload a CSV file to Google Sheets is through direct upload:

  1. Go to Google Sheets and sign in to your Google account
  2. Click on the File menu in the top left corner
  3. Select Import from the dropdown menu
  4. In the Import file dialog, click on the Upload tab
  5. Click Select a file from your device or drag your CSV file into the upload area
  6. After selecting your file, you'll see import options:
    • Create new spreadsheet: Creates a new Google Sheet with your CSV data
    • Insert new sheet(s): Adds your CSV data as a new sheet in the current spreadsheet
    • Replace current sheet: Replaces the data in your current sheet with the CSV data
    • Replace spreadsheet: Replaces the entire spreadsheet with your CSV data
  7. Select Separator type (comma is default for CSV)
  8. Click Import data to complete the process

Google will process your file and import the data according to your settings.

Method 2: Import from Google Drive

If your CSV file is already in Google Drive:

  1. Go to Google Sheets and create a new spreadsheet or open an existing one
  2. Click on File > Import
  3. Select the Google Drive tab
  4. Locate and select your CSV file
  5. Choose your import options as described in Method 1
  6. Click Import data

Method 3: Using the IMPORTDATA function

For smaller CSV files or data from online sources, you can use the IMPORTDATA function:

  1. Open a Google Sheet
  2. In any cell, type: =IMPORTDATA("URL_TO_YOUR_CSV_FILE")
  3. Replace URL_TO_YOUR_CSV_FILE with the URL to your CSV file
  4. Press Enter

The function will fetch and display the CSV data automatically. This method works best for smaller files that are publicly accessible via a URL.

Method 4: Using Google Apps Script

For advanced users or automated imports, Google Apps Script provides powerful options:

function importCSVFromDrive() {
  // ID of the CSV file in Drive
  var fileId = "YOUR_FILE_ID";

  // Get the file
  var file = DriveApp.getFileById(fileId);

  // Get the CSV content
  var csvData = file.getBlob().getDataAsString();

  // Parse the CSV data
  var csvDataArray = Utilities.parseCsv(csvData);

  // Get the active spreadsheet and first sheet
  var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = spreadsheet.getSheets()[0];

  // Clear the sheet
  sheet.clear();

  // Set the values
  sheet
    .getRange(1, 1, csvDataArray.length, csvDataArray[0].length)
    .setValues(csvDataArray);
}

To use this script:

  1. Open your Google Sheet
  2. Click on Extensions > Apps Script
  3. Paste the script and replace YOUR_FILE_ID with your CSV file's ID from Google Drive
  4. Save and run the script

Troubleshooting CSV imports

Encoding issues

If you see strange characters in your imported data, your CSV might use a different character encoding. When importing, try selecting UTF-8 or another appropriate encoding in the import options.

Delimiter problems

While the C in CSV stands for comma, some regions use semicolons or tabs instead. If your data doesn't separate correctly, check the "Separator type" in the import options.

Large file issues

Google Sheets has limits on file size and cell count. For very large CSV files:

  • Consider splitting the file into smaller chunks
  • Use Google BigQuery for large data analysis
  • Import only the necessary columns or rows

Converting other formats to CSV first

If your data is in another format like Excel, JSON, or SQL, you might need to convert it to CSV before importing. Tools like Konbert can help you convert between various data formats easily:

Once converted, you can preview your CSV data before uploading to Google Sheets.


By following these methods, you can efficiently upload and work with CSV data in Google Sheets. The process is straightforward for simple files, while more complex scenarios might require advanced options like Google Apps Script or pre-processing your data before import.