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.
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!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.