如何在批量上传时将填充零填充为ID以使其长度为10. [英] How to left padd zeroes to an id to make its length 10. for an excel file while doing bulk uploading?

查看:123
本文介绍了如何在批量上传时将填充零填充为ID以使其长度为10.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将零填充到id以使其长度为10.将其设置在excel文件中,如果用户输入的id不小于10,则必须将其填充为10.在每个excel列中都不同.

How to left padd zeroes to an id to make its length 10. Its set in an excel file and if the user doesn''t enter for the id less than 10 it has to be left padded naking it 10. The length varies in each excel columns.

推荐答案

C#具有LeftPad选项String.

http://msdn.microsoft.com/zh-CN /library/system.string.padleft(v=vs.80).aspx [
C# has a LeftPad option String.

http://msdn.microsoft.com/en-us/library/system.string.padleft(v=vs.80).aspx[^]


这篇关于如何在批量上传时将填充零填充为ID以使其长度为10.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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