I am very beginner at sas. I made a table in sas using proc sql.
Then I exported to excel with this code which I was told should put a title on the table. However, while it printed onto the excel, theres no title at the top. Not sure what else I can do.
ods excel file="C:\Users\Name\Documents\EPI 612\Lab1Table1Excel.xlsx" options (sheet_name="Rates"); title "Rates for 2025"; proc print data=final_rates_tab noobs label; run; ods excel close;
Check the header of the file. By default the title is not written to a cell in the spreadsheet, instead it is written to the header.
I think in Excel you can still do Page Setup to see the headers.
With the ODS EXCEL destination, you need to use the EMBEDDED_TITLES= suboption as shown below:
ods excel file="C:\Users\Name\Documents\EPI 612\Lab1Table1Excel.xlsx"
options (sheet_name="Rates" embedded_titles='yes');
The documentation shows the other suboptions that are useful:
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.