具有多个数据类型的列的Excel读取问题 [英] Excel reading problem with column having multiple datatypes
本文介绍了具有多个数据类型的列的Excel读取问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在使用C#阅读Excel工作表.有一个采用字母数字值的列.
当我尝试以下值时:
1A5902,ABC123,TEST5
它的工作正常,但当我将新条目添加为59595(任何数值)时
在C#中读取此excel文件时,此值变为null.
我已经尝试过将Excel列格式化为文本格式.
但是结果是一样的.
我将感谢任何解决方案!!!!!
我将尝试将值读取到对象中,然后执行ToString().类型可能不是您想的那样.
Hi All,
I am reading excel sheet using c#. There is column which takes alpha-numeric values.
when i tried following values:
1A5902, ABC123, TEST5
its working fine but when i added new entry as 59595 (any numeric value)
this value become null while reading this excel file in c#.
I have tried same with formatting excel column to text format.
but result is same.
I will be thankful for any solution !!!
解决方案
I would try to read the value into an object, and then do a ToString(). It is probably a problem that the type is not what you think it is.
这篇关于具有多个数据类型的列的Excel读取问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文