Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, When I try to export my data to Excel, my columns are displaying correctly...But the digit column is not displaying by entered manner...

My Codes
VB
ReqSheet.Cells(16, 2).value = ReqDtb.Rows(13).Item("Description").ToString()
ReqSheet.Cells(16, 2).EntireColumn.NumberFormat = "@"


The above Cells(16,2).Value entered ="161509120678410321527461244"

But It has displaying in Excel as 16E+.....etc...

So how to solve this type of errors?

Thanks Again
Posted
Comments
Richard MacCutchan 11-Nov-13 4:01am    
Reformat the column with the appropriate number format.
Paramu1973 11-Nov-13 7:09am    
Thanks Richard....
ReqSheet.Cells(16, 2).EntireColumn.NumberFormat = "################################0"
This solves my problem
thatraja 11-Nov-13 8:43am    
Close this question as solved

1 solution

Thanks Richard.... ReqSheet.Cells(16, 2).EntireColumn.NumberFormat = "#######################0"

This solves my problem
 
Share this answer
 
Comments
Maciej Los 27-Dec-13 11:15am    
+5!
Please, mark your question as "solved" (green button).

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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