如何防止前导零从我的CSV中的列中删除? [英] How can I prevent leading zeroes from being stripped from columns in my CSV?

查看:179
本文介绍了如何防止前导零从我的CSV中的列中删除?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要上传一个CSV文件,但我的文本数据 080108 仍在转换为 80108

I need to upload a CSV file, but my text data 080108 keeps converting to a number 80108. What do I do?

推荐答案

我在使用Microsoft Excel查看CSV时经常看到这个。 Excel将截断所有数字字段中的前导零。如果输出不是来自excel,那么请检查笔记本中的输出。如果是来自excel,您需要在每个邮政编码的开头添加一个单引号'。那么excel将保留前导0。

I have seen this often when viewing the CSV using Microsoft Excel. Excel will truncate leading zeros in all number fields. if the output is not coming from excel then check the output in note pad. If it is coming from excel you need to add a single quote mark ' to the beginning of each zip code. then excel will retain the leading 0.

这篇关于如何防止前导零从我的CSV中的列中删除?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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