ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
TashaChapWUSS
Obsidian | Level 7

Hey all,

 

I'm having this weird issue where my Excel files created with SAS have carriage returns in the middle of the cells.  It's like SAS is determining the column width at some point and then inserting carriage returns instead of true text wrapping.

 

I'd send over some code, but I'm just using a very basic PROC Print in SAS Studio.  I have a feeling it's a settings issue.  I'm having some vague recollection of a setting I used back when we had EG that prevented this, but I could be making that up entirely.

 

Has anyone else run across this?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

If you are using ODS EXCEL to make the files then try FLOW="TABLES" option.

https://support.sas.com/kb/59/351.html

/* Using the FLOW="TABLES" Excel suboption */

ods excel file="c:\temp.xlsx" options(flow="tables");

proc print data=sashelp.orsales label;
run;

ods excel close;

View solution in original post

3 REPLIES 3
Tom
Super User Tom
Super User

If you are using ODS EXCEL to make the files then try FLOW="TABLES" option.

https://support.sas.com/kb/59/351.html

/* Using the FLOW="TABLES" Excel suboption */

ods excel file="c:\temp.xlsx" options(flow="tables");

proc print data=sashelp.orsales label;
run;

ods excel close;
TashaChapWUSS
Obsidian | Level 7
YES! Thank you! I knew it was something like that!

For other SAS Studio or EG Users who are just using the default Excel results, if you go into Tools->Options, and then Results->Excel, simply add FLOW="TABLES" in the "Additional tagset options for ODS Excel statement" box
Reeza
Super User
How are you creating your Excel file?

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2881 views
  • 0 likes
  • 3 in conversation