ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how to set number format for the entire excel sheet (https://www.excelbanter.com/excel-worksheet-functions/181253-how-set-number-format-entire-excel-sheet.html)

CodeKracker

how to set number format for the entire excel sheet
 
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


All times are GMT +1. The time now is 03:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com