Saltearse al contenido

Importing CSV Data to Google Sheets™ (Using CoinGecko Data)

Esta página aún no está disponible en tu idioma.

Bringing data from external sources into Google Sheets™ for analysis is a frequent task. CSV (Comma Separated Values) is a common format for data export.

Google Sheets™ provides built-in functionality for handling CSV data:

  • The File > Import feature can directly import a CSV file into a spreadsheet.
  • For text already present in a cell or column, the Data > Split text to columns feature attempts to separate values based on a chosen delimiter.

While these native tools work well for standard CSV formats, they can sometimes struggle with datasets that use less common delimiters or contain complex text patterns. In certain cases, the Split text to columns feature may incorrectly split data even without clear delimiters.

Consider this example dataset from the Google Analytics™ service where the native split struggles with the date/time format in the first column:

TimeSeries ID,Individual End User Installs
Wed Feb 05 2025 08:00:00 GMT+0800 (Taipei Standard Time),533
Fri Feb 07 2025 08:00:00 GMT+0800 (Taipei Standard Time),142
Sat Feb 08 2025 08:00:00 GMT+0800 (Taipei Standard Time),210
Sun Feb 09 2025 08:00:00 GMT+0800 (Taipei Standard Time),233
Mon Feb 10 2025 08:00:00 GMT+0800 (Taipei Standard Time),263
Tue Feb 11 2025 08:00:00 GMT+0800 (Taipei Standard Time),333
Wed Feb 12 2025 08:00:00 GMT+0800 (Taipei Standard Time),372

Native Split text to columns using comma might incorrectly interpret spaces or other characters, leading to an undesirable split like this:

TimeSeries ID,Individual End User Installs
Wed Feb 05 2025 08:00:00 GMT+0800 (Taipei Standard Time),533
Fri Feb 07 2025 08:00:00 GMT+0800 (Taipei Standard Time),142
Sat Feb 08 2025 08:00:00 GMT+0800 (Taipei Standard Time),210
Sun Feb 09 2025 08:00:00 GMT+0800 (Taipei Standard Time),233
Mon Feb 10 2025 08:00:00 GMT+0800 (Taipei Standard Time),263
Tue Feb 11 2025 08:00:00 GMT+0800 (Taipei Standard Time),333
Wed Feb 12 2025 08:00:00 GMT+0800 (Taipei Standard Time),372
(Note: Tabs shown represent column breaks)

The Text To Table Converter Add-On for Google Sheets™ addresses these limitations with more advanced and automatic delimiter detection, designed to handle a wider variety of text structures robustly.

We will demonstrate how to use the Add-On to convert raw CSV text data into a properly formatted table, using historical Bitcoin price data from CoinGecko as a standard example.

Source Data: CoinGecko Bitcoin Historical Data

We will obtain our sample data from the CoinGecko Bitcoin historical data page:

Link to CoinGecko Bitcoin Historical Data Page

Steps to Convert CSV Text Data to a Table using the Add-On:

  1. Download the CSV File Navigate to the CoinGecko Bitcoin Historical Data page using the link above. Select a date range for the data and click the “Download Data” button. Save the CSV file (e.g., bitcoin_history.csv) to your computer.

    (Download the historical data CSV) Screenshot showing download button on CoinGecko Historical Data page

  2. Copy the CSV Text Content Open the downloaded bitcoin_history.csv file using a plain text editor (like Notepad on Windows, TextEdit on Mac, or VS Code). You will see the data structured with commas separating values and each row on a new line.

    Screenshot showing CSV opened in text editor with sample data (The raw text content of the CSV file)

    Select all the text content within the file and copy it (Ctrl+A then Ctrl+C or Cmd+A then Cmd+C).

    (Copy the raw text from the CSV file) Screenshot showing CSV opened in text editor with text selected

  3. Paste into Google Sheets™ Open a new or existing Google Sheet™. Select a cell where you want to place the data (e.g., cell A1). Right-click and choose “Paste without formatting” or use the keyboard shortcut (Ctrl+Shift+V or Cmd+Shift+V). This will paste the CSV content as raw text, likely all into a single column.

    (Paste the copied text without formatting) Screenshot showing paste without formatting option and result in one column

  4. Select the Pasted Text Select the column or range of cells containing the pasted CSV text data.

    (Select the text you want to convert) Screenshot showing selecting the pasted text in Sheets

  5. Run the Text To Table Converter Add-On Go to the top menu, click Extensions, then Text To Table Converter, and select Text To Table.

    (Launch the Add-On) Screenshot showing Add-On menu in Google Sheets

  6. Review and Confirm Delimiters The Add-On will analyze the selected text. It should automatically detect the comma (,) as the delimiter and potentially identify the header row. Review these suggested settings in the Add-On’s interface if presented and confirm to proceed with the conversion. Unlike native tools, the Add-On is designed to handle various complex text formats within fields.

    (Confirm the delimiter (comma) and other settings) Screenshot showing Add-On settings for delimiter/header

  7. Resulting Table The Add-On will process the selected text and create a structured table with columns and rows, converting the comma-delimited data into cells.

    (The Add-On converts the text into a clean table) Screenshot showing the converted table in Google Sheets

Result:

The raw CSV text data you copied is now organized into a clear table format in your Google Sheet™. The columns will correspond to the fields from the CoinGecko CSV sample: snapped_at, price, market_cap, and total_volume.


Further Analysis:

With the data structured as a table, you can now easily perform analysis directly in Google Sheets™, such as:

  • Creating charts to visualize price trends.
  • Calculating statistics using formulas.
  • Sorting, filtering, or pivoting the data.

While Google Sheets™ offers basic CSV import and text-splitting, the Text To Table Converter Add-On provides more robust and automatic handling for a wider range of delimited text data scenarios, ensuring accurate table creation even from complex text inputs.

Get the Text To Table Converter Add-On