如何防止Excel截断CSV文件中的数字? [英] How to prevent excel from truncating numbers in a CSV file?

查看:408
本文介绍了如何防止Excel截断CSV文件中的数字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的CSV文件的前几行是这样的(从Notepad ++中查看时):

The first few lines of my CSV file look like this (when viewed from Notepad++):


Trace,原始序列号,新的序列号
0000073800000000097612345678901234567890,0054,0001

Trace,Original Serial Number,New Serial number 0000073800000000097612345678901234567890,0054,0001

当我在excel中打开此文件时,我得到了:

When I open this file in excel, I get this:

由于某种原因,Excel会截断序列号和跟踪号。我试图将格式更改为 Text ,但这仍然行不通,因为excel仅看到该值最多为6:

For some reason, excel is truncating the serial numbers and the trace number. I have tried changing the format to Text but that still doesn't work, as excel only sees the value up to the 6:


7.38000000000976E + 34

7.38000000000976E+34

如果将其更改为数字


73800000000097600000000000000000000.00

73800000000097600000000000000000000.00

我该怎么办?我只有60行,因此,如果我必须重新开始,并且有一些如何将文本重新复制到excel中,我会担心,但是担心保存它将再次更改格式。

What can I do? I only have 60 lines, so if I have to start over and some how recopy the text into excel I will, but I'm afraid saving it will change the format once again.

推荐答案

您无需重新开始或更改现有CSV。最快的方法可能是使用Excel的文本导入向导。在获取外部数据下的数据标签中,点击来自文本,然后选择您的CSV文件。

You shouldn't need to start over or alter the existing CSV. The fastest way might be to use Excel's text import wizard. In the data tab under Get External Data click From Text and select your CSV file.

出现的向导将让您告诉Excel每个列的数据类型,并可以告诉它使用文本作为条形码。

The wizard that appears will let you tell Excel the data type of each "column" and you can tell it to use text for your barcode.

这篇关于如何防止Excel截断CSV文件中的数字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆