I have several user specified macro parameters that I'd like to supply on the final report for documentation purposes. Some of fields have embedded single quotes so I can't default switch to single quotes easily.
Eg.
%let fiscal_year = "2014/15" "2013/14";
I'm struggling with how to pass this to my output, which is ODS Tagsets.ExcelXP.
Currently trying
ODS TEXT ="Years" &fiscal_year;
Any help appreciated!
%let fiscal_year = "2014/15" "2013/14";
ods tagsets.excelxp file='C:\TEMP\text.xls'
options( embedded_titles='yes' embedded_footnotes='yes' )
;
title1 %sysfunc(quote(Fiscal Year &fiscal_year));
proc print data=sashelp.class; run;
ods tagsets.excelxp close ;
Except I don't think ODS TEXT= is supported by ExcelXP.
Maybe incorporate it into a TITLE.
I agree, don't think ODS Text works for that tagset. Titles also appear only in the print preview, so maybe not useful.
One suggestion I have is this. The macro variables are stored in the SASHELP.VMACRO dataset. Why not proc report this, putting a where clause on for the macro's you want to, then proc report your other data to the same sheet. Hence two proc reports one sheet?
Thanks all!
Tom and Data _null_'s solution work and the title is in the worksheet.
%let fiscal_year = "2014/15" "2013/14";
ods tagsets.excelxp file='C:\TEMP\text.xls'
options( embedded_titles='yes' embedded_footnotes='yes' )
;
title1 %sysfunc(quote(Fiscal Year &fiscal_year));
proc print data=sashelp.class; run;
ods tagsets.excelxp close ;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.