Import a CSV without losing leading zeros, dates or long numbers
File > Import in Google Sheets turned ZIP 02134 into 2134 and code 3-14 into a date. Clear one box, then convert only the columns you need.
On this page
3/14/2026Before imported with the box checked
| A | C | D | F | |
|---|---|---|---|---|
| 1 | Employee ID | ZIP | Dept code | Bank account |
| 2 | 418 | 2134 | 3-14 | 451237880092164 |
| 3 | 422 | 7030 | 10-2 | 73019264850217463 |
| 4 | 1107 | 60614 | 4-1 | 8820193746 |
| 5 | 935 | 8540 | 12-7 | 30458812907765512 |
| 6 | 2016 | 94110 | 2-20 | 72215590 |
What changed
- Same CSV imported again
- Convert box cleared
After imported with the box cleared
| A | C | D | F | |
|---|---|---|---|---|
| 1 | Employee ID | ZIP | Dept code | Bank account |
| 2 | 00418 | 02134 | 3-14 | 00451237880092164 |
| 3 | 00422 | 07030 | 10-2 | 73019264850217463 |
| 4 | 01107 | 60614 | 4-1 | 8820193746 |
| 5 | 00935 | 08540 | 12-7 | 30458812907765512 |
| 6 | 02016 | 94110 | 2-20 | 0072215590 |
Emily Carter's ZIP code reads 02134, her employee ID 00418 and her department code 3-14 on the Fixed tab of the take-home copy, exactly as the payroll CSV wrote them. That tab came from File, then Import, with one box in the Import file dialog cleared: Convert text to numbers, dates, and formulas. Leave it checked and you get the Broken tab instead.
The file behind both tabs, payroll_export.csv, holds five employees written the way a payroll or bank export writes them. With the box checked, which is how the dialog opened, the ZIP became 2134 and the ID became 418. The department code still reads 3-14 in its cell, but select the cell and the formula bar says 3/14/2026. The IDs, ZIP codes, shorter account numbers, department codes, pay dates and net pay were stored as numbers or dates, and a stored number has no leading zeros to keep.
Import the file again with the convert box cleared
Undoing the damage cell by cell is the slow way, and for some columns it can't be done at all. The Fixed tab was made by importing the same file a second time, like this.
- File, then Import, then the Upload tab, and choose the CSV.
- Under Import location, pick Insert new sheets so the first attempt stays put for comparison.
- Clear the box Convert text to numbers, dates, and formulas.
- Click Import data, then rename the new tab. In the copy it's called Fixed.

Google's Import data sets & spreadsheets page lists the other import locations, from replacing the whole spreadsheet to appending rows under the last row with data.
On the Fixed tab, every field arrived exactly as the file wrote it. A2 shows 00418 against the left edge of the cell, and its formula bar shows '00418. That leading apostrophe is how Sheets marks an entry as text. =LEN(C2) returned 5 there, against 4 on the Broken tab, and the department codes are plain text again.
Dept code 3-14 became a date, and two account numbers stayed text
Employee IDs and ZIP codes lost every leading zero: 00422 became 422, 07030 became 7030 and 08540 became 8540. Megan's 60614 and Olivia's 94110 had no zero to lose, so they look normal.
D2 displays 3-14, and the formula bar for D2 shows 3/14/2026. Each department code, 3-14, 10-2, 4-1, 12-7 and 2-20, can be read as a month and a day, so Sheets stored them as dates while the cells keep displaying the codes. In column M, =ISNUMBER(D2) returned TRUE, which is how a date answers that test.
Pay date went through the same conversion, and here it helped. 11/06/2026 became a real date, =ISNUMBER(E2) returned TRUE, and the cell still shows 11/06/2026. Net pay became numbers too. 1842.50 lost its trailing zero and shows 1842.5, but =SUM(G2:G6) returned 8650.5, the right total.
Bank account numbers came out mixed. 00451237880092164 lost two zeros and became 451237880092164. 0072215590 became 72215590. The two longest numbers, 73019264850217463 and 30458812907765512, were not converted at all: =COUNTA(F2:F6)-COUNT(F2:F6) returned 2, and =TEXT(F3,"0") gives back every digit of Jacob's account. So column F now holds numbers and text side by side.

Net pay and Pay date need VALUE and DATEVALUE after an all-text import
Clearing the box keeps the zeros, and it also keeps the money as text. On the Fixed tab, =COUNT(A2:G6) returned 0 and =SUM(G2:G6) returned 0 as well. =ISNUMBER(E2) returned FALSE, so the pay dates are text too.
Two helper columns turn just those fields into numbers. H2 holds =ARRAYFORMULA(VALUE(G2:G6)), and VALUE fills the column with 1842.5, 1610, 2075.25, 1398.75 and 1724. =SUM(H2:H6) in M9 returned 8650.5, the same total the Broken tab had. I2 holds =ARRAYFORMULA(TO_DATE(DATEVALUE(E2:E6))). Each row shows 11/6/2026, and =ISNUMBER(I2) returned TRUE.

TEXT with "00000" when the original file is gone
Sometimes the CSV is long deleted and all that's left is the converted tab. The Repair after import tab is a copy of the Broken tab with four formulas in H2 to K2:
=ARRAYFORMULA(TEXT(A2:A6,"00000"))returned00418,00422,01107,00935and02016.=ARRAYFORMULA(TEXT(C2:C6,"00000"))returned02134,07030,60614,08540and94110.=ARRAYFORMULA(TEXT(D2:D6,"m-d"))returned3-14,10-2,4-1,12-7and2-20.=ARRAYFORMULA(TEXT(F2:F6,"0"))returned451237880092164for Emily and72215590for Olivia.
TEXT pads a number with zeros when the format has more zeros than the number has digits. That works for IDs and ZIP codes because every one of them is five characters long, so "00000" says exactly how many zeros to put back. The "m-d" format rebuilds the department codes from the dates, and all five came back as the file wrote them.
Account numbers differ in length, so no single format knows that Emily's account started with two zeros, and column K gives back the shortened 451237880092164. For that column, importing the original file again is the only route.

Use the Try it yourself tab for practice; it matches the Broken tab. Enter =ARRAYFORMULA(TEXT(A2:A6,"00000")) in H2, =ARRAYFORMULA(TEXT(C2:C6,"00000")) in I2 and =ARRAYFORMULA(TEXT(D2:D6,"m-d")) in J2, then compare H2:J6 with the same cells on Repair after import.
ZIP codes on the Fixed tab, read back on November 12
| Input | payroll_export.csv, five rows, File > Import with the convert box cleared |
|---|---|
| Formula | None. Import data, Insert new sheets |
| Expected | 02134, 07030, 60614, 08540, 94110 |
| Sheets returned | 02134, 07030, 60614, 08540, 94110 Matches expected |
| Checked | 2026-11-12, free personal account |
The Import file dialog has one convert box for the whole file, with no setting per column. That is why the Fixed tab needs columns H and I for the two fields that should be numbers.
Take-home copy. Four tabs: Broken (as you see it), Fixed, Try it yourself, Repair after import. It opens as a copy in your own Drive.