how to preserve dropping zeros while opening an csv file in excel .
Same answer as your previous question here - Open the file from within Excel, using Excel's data import feature, rather than double click it.
Here's the answer from a different source, if that helps.
http://www.upenn.edu/computing/da/bo/webi/qna/iv_csvLeadingZeros.html
Also, please consider marking some answers correct if they've been answered 🙂
in front of it , add '
like :
'0021
'0032
If you have SAS 9.4 consider ODS Excel or ODS TAGSETS.EXCELXP + a VB script to convert to native Excel file.
You are perhap mixing types here. CSV is a useful format for data transfer, i.e. if you are sending the data to someone that is the best format. If however the file is for review, say in Excel, then use the reporting functionalities, ods tagsets.excelxp for example, which will allow you to specify formats in the markedup output:
https://support.sas.com/resources/papers/proceedings11/266-2011.pdf
So, step one, decide what the output is to be used for, different formats are for different things. Then use the best technology for that purpose.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.