<?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 Accessing Excel file from server and generate the same as an output to the stored process. in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Accessing-Excel-file-from-server-and-generate-the-same-as-an/m-p/290182#M5067</link>
    <description>&lt;P&gt;Hello..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a stored process, in which i have to just grab&amp;nbsp;already created excel report from the server and produce&amp;nbsp;the same (without any changes) as an output of the stored process execution. i am trying to do this using&amp;nbsp;&lt;STRONG&gt;stpsrv_header &lt;/STRONG&gt;but its not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;data _null_;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;rc= stpsrv_header('Content-type', 'application/vnd.ms-excel');&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;rc= stpsrv_header('Content-disposition', 'attachment;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;filename=outtest.xls');&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;run;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did anyone tried this before? Please let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
    <pubDate>Mon, 08 Aug 2016 13:20:46 GMT</pubDate>
    <dc:creator>Micheal_S</dc:creator>
    <dc:date>2016-08-08T13:20:46Z</dc:date>
    <item>
      <title>Accessing Excel file from server and generate the same as an output to the stored process.</title>
      <link>https://communities.sas.com/t5/Developers/Accessing-Excel-file-from-server-and-generate-the-same-as-an/m-p/290182#M5067</link>
      <description>&lt;P&gt;Hello..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a stored process, in which i have to just grab&amp;nbsp;already created excel report from the server and produce&amp;nbsp;the same (without any changes) as an output of the stored process execution. i am trying to do this using&amp;nbsp;&lt;STRONG&gt;stpsrv_header &lt;/STRONG&gt;but its not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;data _null_;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;rc= stpsrv_header('Content-type', 'application/vnd.ms-excel');&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;rc= stpsrv_header('Content-disposition', 'attachment;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;filename=outtest.xls');&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;run;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did anyone tried this before? Please let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2016 13:20:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Accessing-Excel-file-from-server-and-generate-the-same-as-an/m-p/290182#M5067</guid>
      <dc:creator>Micheal_S</dc:creator>
      <dc:date>2016-08-08T13:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Excel file from server and generate the same as an output to the stored process.</title>
      <link>https://communities.sas.com/t5/Developers/Accessing-Excel-file-from-server-and-generate-the-same-as-an/m-p/290192#M5068</link>
      <description>&lt;P&gt;Have you tried my suggestion I gave you in the other thread about the same issue?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2016 13:55:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Accessing-Excel-file-from-server-and-generate-the-same-as-an/m-p/290192#M5068</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-08-08T13:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Excel file from server and generate the same as an output to the stored process.</title>
      <link>https://communities.sas.com/t5/Developers/Accessing-Excel-file-from-server-and-generate-the-same-as-an/m-p/290197#M5069</link>
      <description>&lt;P&gt;Yes Kurt, I tried it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;rc &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; stpsrv_header&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'Content-disposition'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'attachment; filename="test.xls"'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its not giving me any error message but not doing what i intended for. Its just getting executed successfully&amp;nbsp;and no result is coming out.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2016 14:05:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Accessing-Excel-file-from-server-and-generate-the-same-as-an/m-p/290197#M5069</guid>
      <dc:creator>Micheal_S</dc:creator>
      <dc:date>2016-08-08T14:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Excel file from server and generate the same as an output to the stored process.</title>
      <link>https://communities.sas.com/t5/Developers/Accessing-Excel-file-from-server-and-generate-the-same-as-an/m-p/291645#M5070</link>
      <description>Since this doesn't involve any SAS processing the feels a bit unnecessary to use a Stored Process. Consider using other Web aplication server functionality for this.</description>
      <pubDate>Mon, 15 Aug 2016 04:39:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Accessing-Excel-file-from-server-and-generate-the-same-as-an/m-p/291645#M5070</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-08-15T04:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Excel file from server and generate the same as an output to the stored process.</title>
      <link>https://communities.sas.com/t5/Developers/Accessing-Excel-file-from-server-and-generate-the-same-as-an/m-p/293764#M5071</link>
      <description>&lt;P&gt;Michael,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This should work. Have a look at the second half of &lt;A href="https://communities.sas.com/t5/SAS-Stored-Processes/Stored-process-writing-to-the-browser-and-excelxp-tagset/m-p/152833/highlight/true#M2666" target="_self"&gt;this post&lt;/A&gt;&amp;nbsp;that I wrote ages ago.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to use the STP webapp, you need to have Streaming output enabled. Here's the code from the other post.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  filename myFileInput="/myTempFileLocation/&amp;amp;filenameParameter..xml";
  %let RV=%sysfunc(stpsrv_header(Content-type,application/vnd.ms-excel));
  %let RV=%sysfunc(stpsrv_header(Content-disposition,attachment; filename= Histostaffperformance.xml));
  data outmenow;
    length data $1;
    infile myFileInput recfm=n;
    file _webout recfm=n mod;
    input data $char1. @@;
    put data $char1. @@;
  run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Good luck.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nik&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 15:46:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Accessing-Excel-file-from-server-and-generate-the-same-as-an/m-p/293764#M5071</guid>
      <dc:creator>boemskats</dc:creator>
      <dc:date>2016-08-24T15:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Excel file from server and generate the same as an output to the stored process.</title>
      <link>https://communities.sas.com/t5/Developers/Accessing-Excel-file-from-server-and-generate-the-same-as-an/m-p/295437#M5072</link>
      <description>&lt;P&gt;Hi B&lt;SPAN&gt;oemskats,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Greatly appreciate it.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 10:00:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Accessing-Excel-file-from-server-and-generate-the-same-as-an/m-p/295437#M5072</guid>
      <dc:creator>Micheal_S</dc:creator>
      <dc:date>2016-08-31T10:00:24Z</dc:date>
    </item>
  </channel>
</rss>

