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. 🙂
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.