Click here to Skip to main content
15,921,212 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 !!!
Posted

1 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.
 
Share this answer
 
Comments
Ashish Bhujbal 24-Mar-12 5:23am    
I am querying excel which returns a datatable. (as we do in sql)
in that data table, mentioned numeric field is coming as empty string(i.e NULL)


so even if i do ToString to this,

this will be empty string only.
Er. Gayatri 28-Sep-12 4:50am    
Did you get any solution then ?

I am also facing the same problem.
Devang Vaja 28-Sep-12 5:36am    
Gaytri ji convert excel to csv Format than try it will Work any way

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900