CSV文件的创建,而不指数号 [英] CSV file creation without exponential numbers

查看:129
本文介绍了CSV文件的创建,而不指数号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在你身边的指数转换的插入值到CSV文件时发生搞定。我有一个创建一个CSV文件,然后开始进入行到它的过程。一个行内这些字段中插入一个类似的值:

How do you get around the exponential conversion that takes place when inserting a value into a csv file. I have a process that creates a csv file and then starts entering rows into it. One of those fields inside a row inserts a value similar to this:

123,45,45,466,6656,23423,2455,234,2454

123,45,45,466,6656,23423,2455,234,2454

这些都是编号的,我需要的csv文件preserve才能将其导入到另一个程序,预计在这一领域的逗号分隔值的数量只是一个字符串。

These are just a string of id's i need to preserve on the csv file in order to import them into another program that expects a comma separated number of values in this field.

当然,当我打开Excel,并期待在这个CSV它给了我这样的事情: 123,45,45,466,6656,000,000,000,000

Of course when i open excel and look at this csv it gives me something like this: 123,45,45,466,6656,000,000,000,000

所以那些过去几年价值观毫无意义的导入过程和失败。

so those last few values mean nothing to the import process and it fails.

我的问题是我如何写一个CSV文件,解决了我的价值观转化为指数的数字以及preserving逗号分隔数值像上面?

My question is how do i write to a csv file and get around my values being converted to exponential numbers as well as preserving the comma separated number values like above?

在此先感谢 比利

推荐答案

为了解决这个问题,我用在MS Excel 2007以下步骤:

In order to get around this issue i used the following steps in MS Excel 2007:

  1. 在Excel中打开一个空白工作簿。
  2. 选择数据,获取外部数据,导入数据。 (Excel 2007是数据,获取外部数据,从文本数据)
  3. 在浏览到您的.csv文件,并选择导入。
  4. 在导入向导应该出现。
  5. 第1页中选择分隔
  6. 选择您要开始导入的行。
  7. 单击下一步
  8. 在分隔符,选择逗号和/或正在使用其他的分隔符。 注:在窗口的下半部分将preVIEW的数据要导入的方式
  9. 单击下一步
  10. 突出你的数据的每一列在下面的窗口。对于每一列,你可以指定常规,文本,数据,或使用单选按钮,在向导对话框的左上角不导入此列。我用文本选项。这是一个可选步骤。
  11. 单击Finish(完成)。
  1. Open a Blank Workbook in Excel.
  2. Choose Data, Get External Data, Import Data. (Excel 2007 is Data, Get External Data, Data from Text)
  3. Browse to your .csv file and Select "Import".
  4. Import Wizard should appear.
  5. Page 1 Select "Delimited"
  6. Select the row which you want to start the import.
  7. click "Next"
  8. In the Delimiters, select "comma" and/or other delimiters you are using. Note: The bottom half of the window will preview the way the data is to be imported.
  9. click "Next"
  10. highlight each column of your data in the window below. For each column you can specify "General", "Text", "Data", or "do not import column" using the radio buttons in the top left of the Wizard box. I used the "Text" option. This is an optional step.
  11. Click Finish.

这篇关于CSV文件的创建,而不指数号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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