如何防止自动截断Excel单元格中的前导零 [英] How to prevent automatic truncation of leading zeros in Excel cell

查看:241
本文介绍了如何防止自动截断Excel单元格中的前导零的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我粘贴04562,它会自动截断前导零并将其存储为4562.

If I paste 04562, it automatically truncates the leading zero and stores it as 4562.

我希望将其存储为04562。

I want it to to store it as 04562.

推荐答案

如果您正在使用MS Excel编辑需要存储前导零的数字的单元格,只需格式化并将单元格内容定义为TEXT 。如果您以编程方式存储,则可以将该值放在相同的引号中。

If you are using MS Excel to edit the cells where you need to store the numbers with leading zero, just format and define the cell content as TEXT. If you are storing it programmatically, you can put the value in a quote '' for the same.

这篇关于如何防止自动截断Excel单元格中的前导零的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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