Hi All,
Thanks in advance for your suggestions.
i was trying to download .xls file from stored process web application. i am able to save the file to a location on my system but to my surprise i am not getting any report data in it. Can any one help me solve the problem. i am using the code below
libname PNBD meta library="PNBD DB2 Library" metaout=data;
%GLOBAL _ODSOPTIONS _ODSDEST _ODSSTYLE _ODSSTYLESHEET ;
%macro output;
%GLOBAL OUTFMT1 _odsoptions ;
%let OUTFMT1 = &_ODSDEST;
%local OLD_HEADER OUTPUT_FORMAT;
%if (%upcase(&_ODSDEST) eq EXCEL) %then %do;
%let _ODSDEST = HTML;
%let OUTPUT_FORMAT = HTML;
%let OLD_HEADER =
%sysfunc(stpsrv_header(Content-type,application/vnd.ms-excel));
%end;
%else %if (%upcase(&_ODSDEST) eq PDF) %then %do;
%let OUTPUT_FORMAT = HTML;
%let OLD_HEADER =
%sysfunc(stpsrv_header(Content-type,application/pdf));
%let _odsoptions =startpage=NO ls=256 notoc; <---SAS LOG SHOWING SYNTAX ERROR BUT WONT EFFECT EXCEL OUTPUT.
%end;
%if (%qcmpres(&OUTPUT_FORMAT) eq )
%then %let OUTPUT_FORMAT=&_ODSDEST;
%STPBEGIN;
sas code
%MACRO NEW;
%IF &OUTFMT1. EQ EXCEL %THEN %DO;
ODS HTML FILE=_WEBOUT;
goptions reset=all;
options nobyline nonumber nodate ORIENTATION=LANDSCAPE ;
OPTIONS NOBYLINE;
PROC REPORT DATA=NEWFINAL CENTER MISSING NOWINDOWS split="!;
ODS HTML CLOSE;
%END;
%ELSE %IF &OUTFMT1. EQ PDF %THEN %DO;
ods pdf file=_webout;
PROC REPORT DATA=NEWFINAL CENTER MISSING NOWINDOWS split="!;
ods pdf close;
%end;
%MEND NEW;
%NEW
%STPEND;
%mend output;
%output;