I'm using ODS EXCEL to export results produced by PROC FREQ to Excel. The output includes an empty row between the table title and the start of the table (see highlighted in yellow in Excel file). How can I delete that row in my SAS code?
Do I do this in the PROC TEMPLATE or in the ODS EXCEL statement?
Here's my sample code:
*Create sample dataset;
data test;
set sashelp.Class;
run;
*Create template;
proc template;
edit base.freq.onewaylist;
edit FVariable;
just=varjust;
style=rowheader;
header="Age at survey date";
end;
end;
run;
ods excel file="PATHNAME\test.xlsx"
options(sheet_name="Female"
embedded_titles="yes"
embed_titles_once="yes");
proc freq data = test(where=(sex="F"));
tables age;
title "Age at survey for female participants";
run;
ods excel close;
proc template;
delete base.freq.onewaylist;
run;
Thank you!
Thanks! I want to delete it, not just hide it.
How would I do this in PROC TEMPLATE?
Thanks! I will delete it in Excel for now and then look more closely at the proc template code.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.