BookmarkSubscribeRSS Feed
yelkenli
Calcite | Level 5

I use an excel SAS add-in that let's me run SAS code.  I develop the code in SAS Studio.  The resulting dataset in the excel worksheet is bottom justified.  I would like it to be top justified.  Right and left look good and are per standard.  

 

Is there a way to define the justification as Top?

 

Proc print data=mydata;
Run;
2 REPLIES 2
ballardw
Super User

You can override default style element by adding a style(location)={style elements go here} on the proc print statement.

For instance

proc print data=sashelp.class 
   style(data)={backgroundcolor=lightblue}
;
run;

will have the body of the table (data) with a light blue background.

 

You might try

 

proc print data=sashelp.class 
   style(header)={vjust=top}
   style(data)={vjust=top}
;
run;

which might justify the text to the top of the header row and the body of the table. But Excel sometimes doesn't seem to like such things and may get interactions based on column widths.

yelkenli
Calcite | Level 5

This did not work.  I also tried changing the excel default justification, and tried some different formats in the cells.  It seems the SAS proc print overwrites the cell justify styles, though not font and cell colors.  There is an option to use raw values only, but I have dollar and comma formats I do not want to lose.  

 

Again, this is running SAS code in an excel add-in.  

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 861 views
  • 0 likes
  • 2 in conversation