<?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: Not able to download excel file from SAS VA7.5 front end by using stored process. in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Not-able-to-download-excel-file-from-SAS-VA7-5-front-end-by/m-p/703165#M14494</link>
    <description>&lt;P&gt;Change your content type header to use &lt;FONT face="courier new,courier"&gt;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&lt;FONT face="arial,helvetica,sans-serif"&gt;. Your current content header is for xls files.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    rc=stpsrv_header('Content-type','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
    rc=stpsrv_header('Content-disposition',"attachment; filename=Class.xlsx");
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additionally, try modifying your &lt;FONT face="courier new,courier"&gt;data _null_&lt;/FONT&gt; statement to use the code as described in &lt;A href="https://support.sas.com/kb/20/784.html" target="_self"&gt;Usage Note 20784 - Tip for downloading an existing binary file when running the SAS® Stored Process Server&lt;/A&gt;:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; data _null_;
    length data $1;
    INFILE  in  recfm=n;
    file _webout  recfm=n mod;
    input data  $char1. @@;
    put data $char1. @@;
 run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Dec 2020 18:01:51 GMT</pubDate>
    <dc:creator>Stu_SAS</dc:creator>
    <dc:date>2020-12-02T18:01:51Z</dc:date>
    <item>
      <title>Not able to download excel file from SAS VA7.5 front end by using stored process.</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Not-able-to-download-excel-file-from-SAS-VA7-5-front-end-by/m-p/701252#M14475</link>
      <description>&lt;P&gt;Dear team,&lt;/P&gt;
&lt;P&gt;I have created Stored process by using below sas code to export excel file. When i tried to call stored process in SAS VA7.5 it showing below error:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1. Code used for stored process is:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2. Error message screen shot is attached&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="STored process error.PNG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51967iDD93152B3EA035D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="STored process error.PNG" alt="STored process error.PNG" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;ods _all_ close; &lt;BR /&gt;&lt;BR /&gt;data _null_; &lt;BR /&gt;rc=stpsrv_header('Content-type','application/vnd.ms-excel'); &lt;BR /&gt;rc=stpsrv_header('Content-disposition',"attachment; filename=Class.xlsx"); &lt;BR /&gt;run; &lt;BR /&gt;&lt;BR /&gt;%let WORKPATH=%sysfunc(pathname(work)); &lt;BR /&gt;&lt;BR /&gt;filename temp "&amp;amp;WORKPATH/temp.xlsx"; &lt;BR /&gt;&lt;BR /&gt;proc export data=sashelp.class &lt;BR /&gt;outfile=temp &lt;BR /&gt;dbms=xlsx &lt;BR /&gt;replace; &lt;BR /&gt;sheet='mysheet'; &lt;BR /&gt;run; quit; &lt;BR /&gt;&lt;BR /&gt;data _null_; &lt;BR /&gt;infile temp recfm=f lrecl=1; &lt;BR /&gt;file _webout recfm=n; &lt;BR /&gt;input; &lt;BR /&gt;put _infile_; &lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 15:20:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Not-able-to-download-excel-file-from-SAS-VA7-5-front-end-by/m-p/701252#M14475</guid>
      <dc:creator>ShammiKalsi</dc:creator>
      <dc:date>2020-11-24T15:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to download excel file from SAS VA7.5 front end by using stored process.</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Not-able-to-download-excel-file-from-SAS-VA7-5-front-end-by/m-p/703165#M14494</link>
      <description>&lt;P&gt;Change your content type header to use &lt;FONT face="courier new,courier"&gt;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&lt;FONT face="arial,helvetica,sans-serif"&gt;. Your current content header is for xls files.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    rc=stpsrv_header('Content-type','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
    rc=stpsrv_header('Content-disposition',"attachment; filename=Class.xlsx");
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additionally, try modifying your &lt;FONT face="courier new,courier"&gt;data _null_&lt;/FONT&gt; statement to use the code as described in &lt;A href="https://support.sas.com/kb/20/784.html" target="_self"&gt;Usage Note 20784 - Tip for downloading an existing binary file when running the SAS® Stored Process Server&lt;/A&gt;:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; data _null_;
    length data $1;
    INFILE  in  recfm=n;
    file _webout  recfm=n mod;
    input data  $char1. @@;
    put data $char1. @@;
 run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 18:01:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Not-able-to-download-excel-file-from-SAS-VA7-5-front-end-by/m-p/703165#M14494</guid>
      <dc:creator>Stu_SAS</dc:creator>
      <dc:date>2020-12-02T18:01:51Z</dc:date>
    </item>
  </channel>
</rss>

