I make from my program an excel file (xls or csv).
I send 00123 and in Excel I see 123
How I can send and see 00123
Thanks in advance
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Its because excel is treating the data as ‘numeric’. A simple way to force Excel to accept anything as text is to prepend an apostrophe to the text.
e.g. to write an integer 123 as 00000123 just write:
EDIT: Another solution is to set the Cells NumberFormatProperty to text:
You might want to see this article: Excel Cell Auto Format