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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.