I don't think that PROC EXPORT correctly writes to the _WEBOUT FIILEREF, even though no errors are reported.
Try this code and if it works, then you can adapt it to your data:
ods _all_ close;
data _null_;
rc=stpsrv_header('Content-type','application/vnd.ms-excel');
rc=stpsrv_header('Content-disposition',"attachment; filename=Class.xlsx");
run;
%let WORKPATH=%sysfunc(pathname(work));
filename temp "&WORKPATH/temp.xlsx";
proc export data=sashelp.class
outfile=temp
dbms=xlsx
replace;
sheet='mysheet';
run; quit;
data _null_;
infile temp recfm=f lrecl=1;
file _webout recfm=n;
input;
put _infile_;
run;
Vince DelGobbo
SAS R&D
... View more