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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 759 views
  • 0 likes
  • 2 in conversation