how to set number format for the entire excel sheet

C

CodeKracker

Hi all,
I am adding an excel sheet to an excel workbook using VB.NET 1.1. I
am required to copy some data to this excel sheet which would be numbers like
001,002,003 etc. I want the preceding zeroes to be retained in the Excel
sheet but excel is not displaying the preceeding zeroes. It is only
displaying 1,2,3 etc.
one way would be to set the number format for the entire sheet as
'Text' before copying data onto it. Can anyone let me know how to do it using
VB.NET code. I cannot use a macro in this scenario.

Thanks,
CodeKracker
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top