Skip to content

Prob in reading data from excel datasource using C#

Abhay Mhatre

Asked Sep 17, 2008, 10:49 AM EDT1 answer
Share
LinkedInX
Hello Friends,

I am trying to read isbn number from excel data file. My problem is some isbn numbers start from 0 but when I read them using C# 0 get truncated.
Can any one suggest me a way, such that I can read them as string input. So that I can get whole isbn number value, even though it starts from 0.
for example,

if I have following row in excel file

ISBN = 0894478303
Title = bbbbb
.
.
.

When I read this content using C#
I get ISBN as 894478303

I want to get whole ISBN as it is in excel file i.e. 0894478303

Please help me out

Thank you in advanced,
Abhay

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Looking for a solution to my problem, I ran across this posting.  Date is old, but you probably need to store the ISBN as a Text field rather than a General or number format.  If you force the field to be text, it will not dump the leading 0 off.

    Dave
    0