Hi there, I'm having a problem where a title from one sheet in an Excel file I'm creating does not clear even with a "title;" statement after the PROC. I have the titles from this sheet of "Preview of DM Dataset" and "List of Variables" appearing on the next sheet despite the "title;" statement after the proc sql step. I played around a bit and added another simple proc print after the "title;" and the titles appeared before that proc but not on the next sheet, so it seems the titles are "lingering one proc too long" for some reason. I have multiple other sheets being created in this excel file, but this proc sql step is the only one giving me this issue (it appears in another sheet as well laid out exactly the same just with a different dataset). I've noticed this only happens in the excel output, but not in the output in the SAS results window. Is there something more I have to do with excel and proc sql or something? Does anyone have any idea how to fix this? I've tried so many things!! Please help! /**************************************************************************************************************************************************************************/
ods excel options(sheet_interval="now" autofilter='all' sheet_name='Demographic Variable List' row_heights='0, 0, 0, 12, 0, 0, 0' title_footnote_width="14" FLOW='Tables');
title justify=left 'Preview of DM Dataset';
title2 justify=left 'List of variables';
proc sql;
select varnum, name, label, type, length, format
from dictionary.columns
where libname = upcase("X") and memname = upcase("dmdata")
order by 1;
quit;
title;
/* If I add a simple proc print or anything here, both titles still show here but then not on the next sheet like they do now */
/**************************************************************************************************************************************************************************/
ods excel options(sheet_interval="now" autofilter='all' sheet_name='Preview Demographic Data' row_heights='0, 0, 0, 12, 0, 0, 0' title_footnote_width="14" FLOW='Tables');
%macro previewdmdata;
%if &extension_dm. = xpt or &extension_dm. = XPT %then %do;
title;
%if &nobs_varnames_dmdata_sq. > 0 /* code continues in macro with conditional logic */
... View more