I am reading the Excel having a column of long numeric values of more than 8 digit. It also may start from 0
for example 003787677
. Examples in my case are 173370148, 142350093
etc.
The values in dataset have issue for the columns having more than 8 digit length, it converts them in to exponential value like 1.4235e+008
I don't want this value to be converted to exponential or a way to convert it back to correct value.
I cannot change excel column format to number as i may have values started with 0 in front or 00 in front. So i am using text as column format cell
I am using following type of connection while reading .xls at windows 2003 server machine 32 bit:
provider = "Microsoft.Jet.OLEDB.4.0;Data Source=@filename;Extended Properties='Excel 8.0;HRD=Yes;IMEX=1";
Using below statements to read excel:
OleDbDataAdapter oleAdpt = new OleDbDataAdapter("SELECT * From [Sheet1$]", con);
oleAdpt.Fill(dtexcel);