ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do i keep Leading zeros in .CSV file saved as from .xls file (https://www.excelbanter.com/excel-programming/357875-how-do-i-keep-leading-zeros-csv-file-saved-xls-file.html)

Vikas

How do i keep Leading zeros in .CSV file saved as from .xls file
 
I am using VBA for saving one worksheet as .csv file format from a Excel
workbook .One of the columns in that contains values as 00033 and so on.When
my save as statement in vba code executes then i lost the leading zeroes from
that column and finally get only 33 . Is there any way by which i can keep
leading zeroes in that perticuler column.

Niek Otten

How do i keep Leading zeros in .CSV file saved as from .xls file
 
Rename the file a .TXT file and then import. Excel will give you options to choose between Date, text, number, etc.

--
Kind regards,

Niek Otten

"Vikas" wrote in message ...
I am using VBA for saving one worksheet as .csv file format from a Excel
workbook .One of the columns in that contains values as 00033 and so on.When
my save as statement in vba code executes then i lost the leading zeroes from
that column and finally get only 33 . Is there any way by which i can keep
leading zeroes in that perticuler column.





All times are GMT +1. The time now is 11:58 AM.

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