Sub topic 2
Which File Formats Google Sheets Can Import
Assume you already know how to select cells, create sheets, upload files to Google Drive, and recognize a CSV file and an Excel workbook. This chapter focuses on choosing a suitable file format before you import it. The format affects what Google Sheets can preserve, how values are separated, and whether formulas or formatting survive.
The main formats
Google Sheets commonly imports these file types:
.xlsx: The current Excel workbook format. It can contain multiple sheets, formulas, formatting, charts, and other workbook features..xls: The older Excel workbook format. It supports many common spreadsheet features, but it has older technical limits..csv: A comma-separated values file. It usually contains one table of plain text values, with commas separating columns and line breaks separating rows..tsv: A tab-separated values file. It works like CSV, but tabs separate columns..txt: A plain-text file. It may contain a table, but Google Sheets needs to know which character separates the fields..ods: The OpenDocument Spreadsheet format, used by applications such as LibreOffice Calc and Apache OpenOffice Calc.
The first two formats are workbooks. A workbook can contain several sheets and spreadsheet features. CSV, TSV, and many TXT files are delimited text files. They usually describe one rectangular table and do not store workbook features such as multiple sheets, cell colors, or formulas.
| Format | Data structure | Usually preserves multiple sheets? | Typical use |
|---|---|---|---|
| `.xlsx` | Excel workbook | Yes | Sharing a complete spreadsheet |
| `.xls` | Older Excel workbook | Yes | Working with legacy Excel files |
| `.csv` | Delimited text | No | Exporting one table between systems |
| `.tsv` | Tab-delimited text | No | Data containing many commas |
| `.txt` | Plain text, often delimited | No | Logs or custom exports |
| `.ods` | OpenDocument workbook | Yes | LibreOffice or OpenOffice files |
Workbook formats versus delimited text
Choose a workbook format when the file contains more than raw table values. For example, an .xlsx or .ods file is more appropriate when you need several sheets, formulas, formatting, charts, or named ranges.
Choose CSV or TSV when another system exports a table for analysis. These files are simple and widely supported, but they carry little information beyond the cell values. A CSV file does not reliably preserve:
- Multiple worksheets
- Cell formatting
- Column widths
- Charts
- Comments
- Formulas as formulas
- Data validation rules
A CSV export may contain a formula's displayed result rather than the formula itself. It may also turn dates, codes, or identifiers into text that needs interpretation during import.
The separator is part of the file's structure. In CSV, a comma normally separates fields. A TSV uses a tab. A TXT file might use a semicolon, pipe, or another character. If the selected separator does not match the file, several fields can appear in one column, or one field can split into several columns.
customer_id,name,total
00142,"Ada Lovelace",125.50
00143,"Grace Hopper",98.00The example has three columns and two data rows. The quoted name fields can contain spaces without creating extra columns. A field that contains a comma must usually be quoted.
Format choice and feature loss
Importing an Excel or OpenDocument workbook into Google Sheets can convert the file into a Google Sheets document. Common values and formulas often transfer successfully, but specialized features may not. Review workbooks that use macros, external links, unusual formulas, advanced charts, or application-specific controls.
A file extension does not guarantee a valid file. A file named report.csv might actually contain tab-separated data, use a nonstandard encoding, or contain inconsistent row lengths. Inspect a small sample in a text editor when the structure is unclear.
A quick selection rule
Use this decision path:
When you control an export, prefer .xlsx for a complete workbook and .csv or .tsv for a simple table that must move between systems. Use TSV when commas are common in the data and the exporting system supports tabs.
Exercise
You receive a file containing four worksheets, charts, and formulas. You also receive a file containing one table with pipe-separated fields. Which formats best describe these files?
Show answer
The workbook is best represented by XLSX, XLS, or ODS. The single table is a delimited text file, most likely TXT or CSV-like data, but it must be imported with a pipe (|) separator.