BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
irvinery
Fluorite | Level 6

Hi SAS Community,

 

Pretty simple question here, so I'm hoping the solution is pretty straight forward. I am outputting a table (proc report) to Excel via ODS, and I want to align the footnotes below the table to the left rather than centered. Below is my current code, followed by a screenshot of the current output and then a screenshot of the desired output. The reformatting for the desired output was done in Excel, and the goal is to have it output that way without any manual adjustments within Excel. Note that in the output screenshots, I have hidden the actual rows of the table.

 

1. Current Code

ods excel file="&output./test.xlsx"
options(sheet_interval="none" sheet_name="test"
			embedded_titles="yes"
			embedded_footnotes="yes");
ods noproctitle; 
ods escapechar="~";

title "Title";
footnote1 "Footnote1"; 
footnote2 "Footnote2" ;
footnote3 "Footnote3";
proc report data=data style=journal;
column acute_label count percent;
define acute_label / "Prior Treatment ATC Group" format=$32.;
define count / "Count";
define percent / "Percent" format=8.2;
run;
ods excel  close;

2. Current Output

irvinery_0-1678124484655.png

 

3. Desired Output

irvinery_1-1678124531724.png

 

Thanks in advance for any help!

RJ

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

See if using the JUSTIFY  option does what you want:

footnote1 justify=left "Footnote text";

@irvinery wrote:

Hi SAS Community,

 

Pretty simple question here, so I'm hoping the solution is pretty straight forward. I am outputting a table (proc report) to Excel via ODS, and I want to align the footnotes below the table to the left rather than centered. Below is my current code, followed by a screenshot of the current output and then a screenshot of the desired output. The reformatting for the desired output was done in Excel, and the goal is to have it output that way without any manual adjustments within Excel. Note that in the output screenshots, I have hidden the actual rows of the table.

 

1. Current Code

ods excel file="&output./test.xlsx"
options(sheet_interval="none" sheet_name="test"
			embedded_titles="yes"
			embedded_footnotes="yes");
ods noproctitle; 
ods escapechar="~";

title "Title";
footnote1 "Footnote1"; 
footnote2 "Footnote2" ;
footnote3 "Footnote3";
proc report data=data style=journal;
column acute_label count percent;
define acute_label / "Prior Treatment ATC Group" format=$32.;
define count / "Count";
define percent / "Percent" format=8.2;
run;
ods excel  close;

2. Current Output

irvinery_0-1678124484655.png

 

3. Desired Output

irvinery_1-1678124531724.png

 

Thanks in advance for any help!

RJ

 


 

View solution in original post

2 REPLIES 2
ballardw
Super User

See if using the JUSTIFY  option does what you want:

footnote1 justify=left "Footnote text";

@irvinery wrote:

Hi SAS Community,

 

Pretty simple question here, so I'm hoping the solution is pretty straight forward. I am outputting a table (proc report) to Excel via ODS, and I want to align the footnotes below the table to the left rather than centered. Below is my current code, followed by a screenshot of the current output and then a screenshot of the desired output. The reformatting for the desired output was done in Excel, and the goal is to have it output that way without any manual adjustments within Excel. Note that in the output screenshots, I have hidden the actual rows of the table.

 

1. Current Code

ods excel file="&output./test.xlsx"
options(sheet_interval="none" sheet_name="test"
			embedded_titles="yes"
			embedded_footnotes="yes");
ods noproctitle; 
ods escapechar="~";

title "Title";
footnote1 "Footnote1"; 
footnote2 "Footnote2" ;
footnote3 "Footnote3";
proc report data=data style=journal;
column acute_label count percent;
define acute_label / "Prior Treatment ATC Group" format=$32.;
define count / "Count";
define percent / "Percent" format=8.2;
run;
ods excel  close;

2. Current Output

irvinery_0-1678124484655.png

 

3. Desired Output

irvinery_1-1678124531724.png

 

Thanks in advance for any help!

RJ

 


 

irvinery
Fluorite | Level 6
Yes, problem solved! Thanks so much, just as straightforward as I was hoping haha.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 2 replies
  • 1194 views
  • 0 likes
  • 2 in conversation