Sub topic 2
Choosing where the data goes: new, replace or append
This chapter assumes you know how to open a Google Sheets file, what a CSV file is, and how to use File > Import.
Choosing an import location
The import dialog asks where the data should go. Each option treats existing data differently.
| Option | What happens to existing data |
|---|---|
| Create new spreadsheet | Nothing changes. The file opens in a new spreadsheet. |
| Insert new sheet(s) | Adds a tab. Existing tabs stay as they are. |
| Replace data at selected cell | Overwrites cells starting at the selected cell. |
| Replace current sheet | Clears the active tab, then writes the file. |
| Append rows to current sheet | Adds rows below the last filled row. |
Use Append for recurring exports that must keep earlier rows. Append does not check for duplicates, so importing the same file twice doubles the rows.
Separator type and conversion
Under Separator type, choose Comma, Semicolon, Tab, or Detect automatically. Choose Semicolon for files from locales that use commas as decimal separators.
The option "Convert text to numbers, dates, and formulas" controls type conversion. When it is on, "00123" becomes 123, "3/4" may become a date, and a cell beginning with "=" becomes a live formula. Turn it off to keep every value as text.
If leading zeros were already lost, a formula can restore a five-digit code in a helper column:
=TEXT(A2, "00000")Opening and converting Excel workbooks
Upload the .xlsx file to Drive, then open it with Google Sheets. Sheets creates a converted copy and leaves the original file unchanged.
After conversion, check these items on each sheet:
- Formulas that use functions Sheets does not support
- Macros, which do not run. Sheets drops them.
- Charts and pivot tables, which may look different.
- Conditional formatting and data validation rules, which may change.
> Convert a copy, never the original. Keep the .xlsx file as your backup.
Wait, block quotes are not allowed. Here is the callout instead:
Encoding and locale
Sheets reads UTF-8 text most reliably. If accented letters appear as symbols such as "é", save the file as CSV UTF-8 from Excel and import it again.
The spreadsheet locale, set under File > Settings, controls how Sheets reads decimal separators and date order. A mismatched locale can turn "3,5" into a date or leave it as text. Set the locale before you import.
Exercise
You import a monthly CSV into an existing report tab, and each month's rows must add to the rows already there. Which import location do you choose, and what should you check first?
Show answer
Choose "Append rows to current sheet." Check that the new file has no repeated header row and that its rows are not already in the sheet, because Append does not remove duplicates.