简体   繁体   English

将csv导入Excel时如何避免科学记数法?

[英]How to avoid Scientific Notation when importing a csv into Excel?

I'm new in the Stack Overflow community and would very much appreciate any help.我是 Stack Overflow 社区的新手,非常感谢任何帮助。

I'm trying to import a csv file from the US Energy Information (Downloadable from the "Download Options" button), except from the year column 1992 to 2014 the numbers imported are in the scientific notation.我正在尝试从美国能源信息(可从“下载选项”按钮下载)导入一个 csv 文件,但从 1992 年到 2014 年的年份列中,导入的数字采用科学计数法。

If I try to change the format of these columns to "Number" then the numbers become "wrong" (ie the decimal point is shifted or deleted, Eg : 256.5375E+13 & 27.4525E+12 then have the same amount of digits in the number and the the larger number actually becomes the smaller one (in this case)).如果我尝试将这些列的格式更改为“数字”,那么数字就会变成“错误”(即小数点被移动或删除,例如:256.5375E+13 & 27.4525E+12 然后在数字和较大的数字实际上变成较小的数字(在这种情况下))。

I'm using Windows 10 with a German system, but I have changed the decimal divider from the German system (using a comma) to the UK / US system (using a period / dot).我在德国系统上使用 Windows 10,但我已将十进制分隔符从德国系统(使用逗号)更改为英国/美国系统(使用句点/点)。

How can I avoid this?我怎样才能避免这种情况?

Possible solution if I am understanding things correctly:如果我理解正确,可能的解决方案:

After you select the CSV file from Power Query, and before you select Load , select the Transform Data option down at the bottom:从 Power Query 中选择 CSV 文件后,在选择Load之前,选择底部的Transform Data选项:

在此处输入图片说明

Once in the PQ UI, right click on the relevant column header, and choose Change Type / Using Locale from the drop down window.进入 PQ UI 后,右键单击相关列标题,然后从下拉窗口中选择Change Type / Using Locale

In the resultant dialog, you choose the format of the data you are inputting.在结果对话框中,您选择输入的数据的格式。 Presumeably this will be Decimal Number and English (United States)大概这将是Decimal NumberEnglish (United States)

在此处输入图片说明

Then choose Close and Load from the Main Menu, and you should be good to go.然后从主菜单中选择Close and Load ,你应该很高兴。

在功能区中选择数据,然后获取数据,然后选择您的文件,然后您可以将“数据类型检测”更改为“不检测数据类型”,这应该可以工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 .Net 中从 Excel 导入时的科学记数法 - Scientific notation when importing from Excel in .Net 如何在R中将字符串保存为CSV中的字符,以便在excel中打开时不会转换为科学计数法? - How to save a string as a character in CSV in R, so that it doesn't covert into scientific notation when i open in excel? 将CSV导入Excel:导入向导无法识别文本限定符,但直接在Excel中打开将转换为科学计数法 - Importing CSV into Excel: import wizard fails to recognize text qualifier but opening directly in Excel converts to scientific notation Oracle报告到Excel电子表格以避免科学计数 - Oracle reports to excel spreadsheet avoid scientific notation 使用Perl和Excel时如何禁用科学计数法 - How to disable the scientific notation when working with Perl and Excel 将SQL导出到Excel时的科学计数法 - Scientific notation when exporting SQL to Excel 使用 write.csv 保存时,excel 更改 r 数据框的科学记数法 - excel changes scientific notation of r dataframe when saved with write.csv 在用php和pear写入excel时如何避免大数的科学记数法 - How to avoid scientific notation for large numbers while writing into excel with php and pear 从 SSRS 下载 .csv 需要避免科学记数法格式 - Downloading .csv from SSRS need to avoid scientific notation format 如何在不转换为 VBA 中的科学记数法的情况下将长数从 csv 导入到 excel - How to import long number from csv to excel without converting to scientific notation in VBA
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM