We need to send a comma-delimited file to another party, the recipients are not technically sophisticated. We need the certain numeric data (stored in SAS char variables) to have the leading zeroes preserved and be displayed as text in the CSV file. We're using Excel 2003 and if the number of rows is under the limit I can use proc export to excel and get the desired result. However, the number of rows is usually above the limit and I have not found a workable solution. I'd like to find a solution where SAS will generate the file in the desired format and neither I nor the users will have to spend time converting it to something usable.
If you append a leading "'" (single quote mark) to any CSV-formatted cell/column value, Excel automatically treats it as character, as-is, where-is. It's up to you to perform the DATA MANIPULATION using a Data Step technique, with a PUT function in a SAS variable assignment statement.