Khi số 0 ở đầu biến mất
- Kiểm tra
- Chuyển đổi
When postal codes like "0123456" or phone numbers like "09012345678" are brought from CSV into Excel, the leading 0 vanishes. In Convert CSV to Excel (.xlsx) numbers starting with 0 are entered as text, so they don't vanish.
Các bước
- Choose the CSV with "Choose a CSV file", or paste into "CSV content".
- Check the setting "Enter numbers as numeric values".
- Press "Make Excel and save" and save.
Why the 0 vanishes
Excel automatically turns values that can be read as numbers into numeric values. The number "007" is treated as "7" and the leading 0 disappears. Opening a CSV directly in Excel triggers this conversion.
How this tool handles it
- Numbers starting with 0: stored as text. Postal codes, phone numbers, member numbers and product codes are protected.
- Ordinary numbers: stored as numeric values (when "Enter numbers as numeric values" is on). Usable in calculations.
Examples of numbers starting with 0
- Postal code: 0123456
- Phone number: 09012345678
- Member or employee number: 000123
- Product code: 00045
Caution: not usable in calculations
Numbers entered as text can't be used in calculations such as sums and averages. If a number you want to calculate with (such as an amount) starts with 0 and became text, convert it to a number in Excel.
Numbers you don't want as values
Numbers you don't calculate with, like phone numbers and member numbers, are appropriately kept as text.
Phù hợp với
- Turning customer lists and address-book CSVs into Excel
- Keeping product codes as they are
- Not wanting to corrupt a postal code column
Ví dụ
Wanted to make Excel from a CSV with member numbers in the form "000123". Opening normally gave "123", but with this tool it was saved as "000123".
Common stumbling blocks
- A CSV whose 0s have already vanished: if the 0 was lost already in the original CSV, it can't be restored. Output again from the original system.
- A numeric column also became text: a column with values starting with 0 mixed in may become all text.
Frequently asked questions
What about decimals like 0.5?
Decimals starting with "0." are treated as numeric values.
Tóm tắt
Numbers starting with 0 are protected as text. Numbers you calculate with go in as values.
Dùng “Chuyển CSV sang Excel (.xlsx)” (miễn phí)Công cụ hay dùng cùng
- Chuyển Excel sang CSV hoặc JSON: Chuyển một trang tính Excel sang CSV, TSV hoặc JSON.
- Chuyển đổi CSV và JSON: Chuyển đổi giữa CSV và JSON ngay lập tức.
- Xóa dòng trùng lặp và sắp xếp danh sách: Xóa các dòng trùng lặp và sắp xếp chúng.
Nếu hướng dẫn này hữu ích, một khoản ủng hộ nhỏ sẽ là niềm động viên lớn.
Gửi tiền ủng hộ (¥300)Tặng quà (danh sách mong muốn Amazon)