If you happen to have 'full' local SAS with the 'old text editor' you can do the following.
Suppose you have this code in your editor
data class;
set sashelp.class;
run;
Highlight either sashelp.class or class and type 'xlsh' on the clean command line. Excel will open with the the sasdatset imported.
==> xlsh
You can also put the command macro on a function key. (highlight - hit key fyi macro xls for last dataset)
SAS removed this functionality in all editors after the old text editor.
The command macro has to be in your autocall library.
I also have shift-rmb to list 40 obs from last dataset with obs number.
and many more. Much faster that SAS viewer and you can cut and paste.
and excel will open with the SAS dataset importted.
%macro xlsh /cmd ;
store;note;notesubmit '%xlsha;';
run;
%mend xlsh;
%macro xlsha/cmd;
filename clp clipbrd ;
data _null_;
infile clp;
input;
put _infile_;
call symputx('argx',_infile_);
run;
%let __tmp=%sysfunc(pathname(work))\myxls.xlsx;
data _null_;
fname="tempfile";
rc=filename(fname, "&__tmp");
put rc=;
if rc = 0 and fexist(fname) then
rc=fdelete(fname);
rc=filename(fname);
run;
libname __xls excel "&__tmp";
data __xls.%scan(__&argx,1,%str(.));
set &argx.;
run;quit;
libname __xls clear;
data _null_;z=sleep(1);run;quit;
options noxwait noxsync;
/* Open Excel */
x "'C:\Program Files\Microsoft Office\OFFICE14\excel.exe' &__tmp";
run;quit;
%mend xlsha;
... View more