C#中将html表转换为excel工作表时的数字格式问题 [英] number format problem when converting a html table to excel sheet in C#

查看:79
本文介绍了C#中将html表转换为excel工作表时的数字格式问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在将html表转换为excel工作表时遇到问题,我的项目中有一个包含数字的列.转换为excel工作表后,包含以零开头的数字的列(邮政编码)以0作为开始

例如

0123即将成为123

谁能为我解决....

hi all,

i have a problem in my project while converting a html table to excel sheet a column contains numbers.after converting into excel sheet the column(Zip Code) containing numbers starting with Zero is coming with zero as starting

for example

0123 is coming as 123

can any one solve for me....
thanks in advance.

推荐答案

您需要按照以下说明向单元格中添加数字格式:
You need to add a number format to the cell as described here[^], or prefix the value with a '' (single quote), which forces Excel to treat it as text.


这篇关于C#中将html表转换为excel工作表时的数字格式问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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