BookmarkSubscribeRSS Feed
ncsthbell
Quartz | Level 8

I have not been succesful at figuring out how to print column headers & column values out vertically on a SAS report using Proc Report. I have been researching on this all day.     I do not see any options to allow this.  Can someone give me some direction on how I can accomplish this. 

 

Thanks for any direction/guidance you could give me!

 

 

3 REPLIES 3
ballardw
Super User

Which ODS destination do you want to use?

And what type of "vertical" do you want? Reads top to bottom, bottom to top, letters with normal orientation or rotated (on their side or upside down)

Is this only for column headers or elsewhere in the table?

And which version of SAS are you using?

ncsthbell
Quartz | Level 8

Thank you for your reply, I hope this information explains it better.

 

Which ODS destination do you want to use?  _ODSDEST=TAGSETS.EXCELXP

 

SAS Version:  9.2

 

And what type of "vertical" do you want? Reads top to bottom, bottom to top, letters with normal orientation or rotated (on their side or upside down)

Is this only for column headers or elsewhere in the table?

 

I want the column headers and column values vertical, example:

ColumnHeader     ColumnValue

AccountNbr             3301

RecvdToDate          10050.00

PeriodYear              2014

OtherData                xyz

 

AccountNbr             3302

RecvdToDate          567810.00

PeriodYear              2015

OtherData                abc

 

Note: This is a small representation of the columns. The data for each ‘AccountNbr’ will be summarized by year and the user wants the output to be printed (as excel) in the above format. For each AccountNbr, the columns will be repeated and will be printed (vertically).

Ksharp
Super User
ods tagsets.msoffice2k_x file="c:\temp\rotate.xls" style=normal
      options( rotate_headers="45"
               height="60"  );


  proc print data=sashelp.prdsale;
  title "Rotate header";
  run;

  ods tagsets.msoffice2k_x close;

http://support.sas.com/rnd/base/ods/odsmarkup/msoffice2k/index.html

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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