Problem in accessing 4 decimal values while uploading excel into asp.net c#

Posted by Prabu_Spark under ASP.NET on 10/21/2013 | Points: 10 | Views : 7956 | Status : [Member] | Replies : 5
Hi sir,
Problem in accessing 4 decimal values while uploading excel into asp.net c#. I have created one website that upload one excel file containing one field 'customerid' as "5.53861.11.11.100126", but it shows null value while the other values like "1.14026836"
showing the correct values in 'customerid' field.

My question is why i cant able to read the 'customerid' field as "5.53861.11.11.100126". I can able to read the value "1.14026836". Kindly give me the solution for this problem.

With regards,
J.Prabu.
[Email:prbspark@gmail.com]



Responses

Posted by: Bandi on: 10/21/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
What is the datatype of that column in excel sheet? check the data type . make sure that the column type as string

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabu_Spark on: 10/22/2013 [Member] Starter | Points: 25

Up
0
Down
Hi Bandi,
I tried both the text and number format in excel, but it does not work. I tried to replace the symbol "." with "-" it works well. So i need the solution , how to take more than "." values in excel to .net during the upload.

Kindly give me the solution for this problem.

With regards,
J.Prabu.
[Email:prbspark@gmail.com]

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 10/22/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
While uploading data from excel you have to give data type of that cell as text/string...
Have you converted the cell type programmatically?

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 10/22/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Refer this link once:
http://stackoverflow.com/questions/904519/how-to-show-long-numbers-in-excel/904524#904524

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabu_Spark on: 10/22/2013 [Member] Starter | Points: 25

Up
0
Down
Hi bandi,
I am using text format in excel and string format in asp.net .

With regards,
J.Prabu.
[Email:prbspark@gmail.com]

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response