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
3. Desired Output
Thanks in advance for any help!
RJ
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
3. Desired Output
Thanks in advance for any help!
RJ
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
3. Desired Output
Thanks in advance for any help!
RJ
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!
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.
Ready to level-up your skills? Choose your own adventure.