Good Friday everyone!
I use ODS excel to generate a report, but the text in some of the columns got automatically wrapped like the example below:
| Worsening of Congestive heart failure | Cardiac failure congestive |
Is there a way to control not let the ODS wrap the text, or I can control the width of the columns through style (data)?
Thanks!
ODS Excel FILE="NameAndPathOfTheFile.xlsx" OPTIONS(FLOW='Tables');
/* PROC or DATA step here */
ODS Excel Close;Please let me know, how was the output. I don't have Microsoft Excel to confirm whether it worked or not.
May be FLOW='Tables' as an option in ODS Excel will help!! The link is here (http://support.sas.com/kb/59/351.html)
ODS Excel FILE="NameAndPathOfTheFile.xlsx" OPTIONS(FLOW='Tables');
/* PROC or DATA step here */
ODS Excel Close;Please let me know, how was the output. I don't have Microsoft Excel to confirm whether it worked or not.
Thank you, the FLOW='Tables' not working for me probably because of the SAS version (I am using SAS 9.4), but I used the "style width = ", and it worked perfect!
Thank you @koyelghosh again and BIG thanks to the entire SAS programming community for the tremendous helps/supports I have been getting throughtout the years!
Hello, Can you elaborate how to use "style with" to unwrapped text?
Thanks.
first, you need to combine the data using '^n' as below:
CSA = catx('^n', country, sex, age);
then, using the ods option to define the escapechar
options ods escapechar='^';
last, you will have
Country/Sex/Age |
Canada |
I hope this works for you
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!
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.