BookmarkSubscribeRSS Feed
jim_snider
Calcite | Level 5
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.
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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.

Scott Barry
SBBWorks, Inc.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Discussion stats
  • 1 reply
  • 810 views
  • 0 likes
  • 2 in conversation