Hi there,
i want to use the export funtion while doing regression analyses as follows:
ODS TAGSETS.EXCELXP
file='H:\Bildung_&x._mitAbi.xls'
STYLE=minimal
OPTIONS ( Orientation = 'landscape'
FitToPage = 'yes'
Pages_FitWidth = '1'
Pages_FitHeight = '100' );
It is part of an big analysis macro. Is there a way that i can tell SAS that the "&x." in "file='H:\Bildung_&x._mitAbi.xls'" is actualy a macro variable? Its going to be a realy big number of regression analyses and i realy dont want to name the files manualy.
Best regards,
Tom
Your program is nearly fine as is.
Single quotes suppress all macro activity. Use double quotes instead of single quotes around the file path.
Your program is nearly fine as is.
Single quotes suppress all macro activity. Use double quotes instead of single quotes around the file path.
something like that:
/*1st SOLUTION: using double quote*/
file="H:\Bildung_&x._mitAbi.xls"
STYLE=minimal
OPTIONS ( Orientation = 'landscape'
FitToPage = 'yes'
Pages_FitWidth = '1'
Pages_FitHeight = '100' );
/*2nd SOLUTION: resolve the macrovars before*/
%LET X =file_xls_name;
%LET FILE_AND_PATH =H:\Bildung_&X._mitAbi.xls;
%PUT &X.;
%PUT &FILE_AND_PATH.;
file="&FILE_AND_PATH."
STYLE=minimal
OPTIONS ( Orientation = 'landscape'
FitToPage = 'yes'
Pages_FitWidth = '1'
Pages_FitHeight = '100' );
???
Thanks. That was an easy solution, which spares me from a lot of work. 🙂
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!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.