<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Downloading Excel file from stored process web application in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Downloading-Excel-file-from-stored-process-web-application/m-p/62994#M3198</link>
    <description>Try to get something simple to work, and then incrementally add more complex logic:&lt;BR /&gt;
&lt;BR /&gt;
[pre]%let RV=%sysfunc(appsrv_header(Content-type,application/vnd.ms-excel));&lt;BR /&gt;
%let _ODSDEST=html;&lt;BR /&gt;
%STPBEGIN;&lt;BR /&gt;
  proc print data=sashelp.class; run; quit;&lt;BR /&gt;
%STPEND;[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Vince DelGobbo&lt;BR /&gt;
SAS R&amp;amp;D</description>
    <pubDate>Mon, 17 Jan 2011 18:41:11 GMT</pubDate>
    <dc:creator>Vince_SAS</dc:creator>
    <dc:date>2011-01-17T18:41:11Z</dc:date>
    <item>
      <title>Downloading Excel file from stored process web application</title>
      <link>https://communities.sas.com/t5/Developers/Downloading-Excel-file-from-stored-process-web-application/m-p/62993#M3197</link>
      <description>Hi All,&lt;BR /&gt;
Thanks in advance for your suggestions.&lt;BR /&gt;
&lt;BR /&gt;
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&lt;BR /&gt;
&lt;BR /&gt;
                                             &lt;BR /&gt;
libname PNBD meta library="PNBD DB2 Library"  metaout=data;&lt;BR /&gt;
%GLOBAL _ODSOPTIONS _ODSDEST _ODSSTYLE _ODSSTYLESHEET ;&lt;BR /&gt;
%macro output;&lt;BR /&gt;
  %GLOBAL OUTFMT1 _odsoptions ;&lt;BR /&gt;
  %let OUTFMT1 = &amp;amp;_ODSDEST;&lt;BR /&gt;
  %local OLD_HEADER OUTPUT_FORMAT;&lt;BR /&gt;
  %if (%upcase(&amp;amp;_ODSDEST) eq EXCEL) %then %do;&lt;BR /&gt;
    %let _ODSDEST = HTML;&lt;BR /&gt;
    %let OUTPUT_FORMAT = HTML;&lt;BR /&gt;
    %let OLD_HEADER =&lt;BR /&gt;
      %sysfunc(stpsrv_header(Content-type,application/vnd.ms-excel));&lt;BR /&gt;
	 %end;&lt;BR /&gt;
  %else %if (%upcase(&amp;amp;_ODSDEST) eq PDF) %then %do;&lt;BR /&gt;
    %let OUTPUT_FORMAT = HTML;&lt;BR /&gt;
    %let OLD_HEADER =&lt;BR /&gt;
      %sysfunc(stpsrv_header(Content-type,application/pdf));&lt;BR /&gt;
    %let _odsoptions =startpage=NO ls=256 notoc; &amp;lt;---SAS LOG SHOWING SYNTAX ERROR BUT WONT EFFECT EXCEL OUTPUT.&lt;BR /&gt;
  %end;&lt;BR /&gt;
 &lt;BR /&gt;
  	 %if (%qcmpres(&amp;amp;OUTPUT_FORMAT) eq )&lt;BR /&gt;
      %then %let OUTPUT_FORMAT=&amp;amp;_ODSDEST;&lt;BR /&gt;
%STPBEGIN; &lt;BR /&gt;
sas code &lt;BR /&gt;
%MACRO NEW;&lt;BR /&gt;
%IF &amp;amp;OUTFMT1. EQ EXCEL %THEN %DO;&lt;BR /&gt;
ODS HTML FILE=_WEBOUT;&lt;BR /&gt;
goptions reset=all;&lt;BR /&gt;
options nobyline nonumber nodate ORIENTATION=LANDSCAPE ;&lt;BR /&gt;
&lt;BR /&gt;
OPTIONS NOBYLINE;&lt;BR /&gt;
PROC REPORT DATA=NEWFINAL CENTER MISSING NOWINDOWS split="!;&lt;BR /&gt;
ODS HTML CLOSE;&lt;BR /&gt;
%END;&lt;BR /&gt;
%ELSE %IF &amp;amp;OUTFMT1. EQ PDF %THEN %DO;&lt;BR /&gt;
ods pdf file=_webout;&lt;BR /&gt;
PROC REPORT DATA=NEWFINAL CENTER MISSING NOWINDOWS split="!;&lt;BR /&gt;
&lt;BR /&gt;
ods pdf close;&lt;BR /&gt;
%end;&lt;BR /&gt;
%MEND NEW;&lt;BR /&gt;
%NEW&lt;BR /&gt;
%STPEND;&lt;BR /&gt;
%mend output;&lt;BR /&gt;
%output;</description>
      <pubDate>Mon, 17 Jan 2011 01:47:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Downloading-Excel-file-from-stored-process-web-application/m-p/62993#M3197</guid>
      <dc:creator>hari1109</dc:creator>
      <dc:date>2011-01-17T01:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading Excel file from stored process web application</title>
      <link>https://communities.sas.com/t5/Developers/Downloading-Excel-file-from-stored-process-web-application/m-p/62994#M3198</link>
      <description>Try to get something simple to work, and then incrementally add more complex logic:&lt;BR /&gt;
&lt;BR /&gt;
[pre]%let RV=%sysfunc(appsrv_header(Content-type,application/vnd.ms-excel));&lt;BR /&gt;
%let _ODSDEST=html;&lt;BR /&gt;
%STPBEGIN;&lt;BR /&gt;
  proc print data=sashelp.class; run; quit;&lt;BR /&gt;
%STPEND;[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Vince DelGobbo&lt;BR /&gt;
SAS R&amp;amp;D</description>
      <pubDate>Mon, 17 Jan 2011 18:41:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Downloading-Excel-file-from-stored-process-web-application/m-p/62994#M3198</guid>
      <dc:creator>Vince_SAS</dc:creator>
      <dc:date>2011-01-17T18:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading Excel file from stored process web application</title>
      <link>https://communities.sas.com/t5/Developers/Downloading-Excel-file-from-stored-process-web-application/m-p/62995#M3199</link>
      <description>Thanks vince today i tried with the code and i made some changes like i removed file=_webout; from ods html file =_webout;. it is working. Thank you for your suggestion.</description>
      <pubDate>Tue, 18 Jan 2011 02:44:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Downloading-Excel-file-from-stored-process-web-application/m-p/62995#M3199</guid>
      <dc:creator>hari1109</dc:creator>
      <dc:date>2011-01-18T02:44:13Z</dc:date>
    </item>
  </channel>
</rss>

