Hi,
I have made sas stored procedure and then transfered output to excel. But in excel preceding zero's are missing.
e.g. value in sas value in excel
005407 5407
001 1
i have tried following code.
DEFINE SERIES_BASE / DISPLAY "SERIES BASE" Style(data)={tagattr='Format: @'} FORMAT= $CHAR4.;
DEFINE SERIES_BASE / DISPLAY "SERIES BASE" Style(data)={tagattr='Format: text'} FORMAT= $CHAR4.;
DEFINE SERIES_BASE / DISPLAY "SERIES BASE" Style(data)={tagattr='Format: $'} FORMAT= $CHAR4.;
I am getting error.
Can anyone please help.
Thanks in advance
Excel interprets any data cell that contains only digits as a number and formats accordingly. That's just Excel.
You might try adding a single quote before the leading zeroes.
For reference, please post your ODS statement(s) you used for the proc report.
Hi,
Your define should be - and do note whilst we are on the subject, follow some good coding practices - i.e. not all upper case or mixed case, use indentation etc. and there is a code window {i} above where you post for code.
define series_base / display "SERIES BASE" style={tagattr='Format:@'};
If that still persists you will need to post example test data in the form of a datastep and the code (formatted so it is readable) so we can have a look.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.