3

我有一个 CSV 文件,其中一列存储了一些帐号文本,例如99010124450000237,但是当我尝试将其保存到 excel 时,它总是将数字格式化为99010124450000200,最后一位2数字被四舍五入。这太烦人了,因为实际上我只希望帐号是文本字段,但 Excel 将始终将其视为数字,更糟糕的是,它是四舍五入的。有人有相同的观点,也许有一些建议?

我尝试将列格式化为特定格式,并尝试导入数据。两种方法都不起作用。

4

1 回答 1

3

You don't say what version you're using, but the following seems to work in Excel 2007:

  1. Use Data ... Get External Data ... From Text Select your file and click "Import"
  2. In Text Import Wizard Step 1, set Original Data Type to "Delimited" (the default on my installation)
  3. In Text Import Wizard Step 2, select your delimiter (my test file uses Comma)
  4. In Text Import Wizard Step 3, click on the column with the account number (it should be highlighted) and change "Column Data Format" to "Text"
  5. Click "Finish"

I used a file with the following text, selecting the second column to be Text:

"99010124450000237",99010124450000237,"99010124450000237"
99010124450000237,"99010124450000237","99010124450000237"

and got this output:

         A                 B                     C
1    9.90101E+16    99010124450000237   9.90101E+16
2    9.90101E+16    99010124450000237   9.90101E+16
于 2012-10-15T08:28:09.280 回答