<?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: SAS Viya Job: Excel download in Developers</title>
    <link>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/840022#M6192</link>
    <description>&lt;P&gt;The `_program=/should/be/the/path/to/your/job/in/sas/drive` WITHOUT a .sas extension&lt;/P&gt;</description>
    <pubDate>Fri, 21 Oct 2022 20:37:30 GMT</pubDate>
    <dc:creator>AllanBowe</dc:creator>
    <dc:date>2022-10-21T20:37:30Z</dc:date>
    <item>
      <title>SAS Viya Job: Excel download</title>
      <link>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/840008#M6189</link>
      <description>&lt;PRE&gt;HI,&lt;BR /&gt;If I run the code below, why is there _webout.html and _webout.xls links. I just want the ok.xlsx &lt;BR /&gt;file to download. Is there a way to do it?&lt;BR /&gt; &lt;BR /&gt;* Create the Excel XML output and associate with the job;&lt;BR /&gt;filename xmlfile filesrvc parenturi="&amp;amp;SYS_JES_JOB_URI"&lt;BR /&gt;name='_webout.xls'&lt;BR /&gt;contenttype='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'&lt;BR /&gt;contentdisp="attachment; filename=ok.xlsx";&lt;BR /&gt;&lt;BR /&gt;ods excel file=xmlfile options(sheet_name="chk" frozen_headers='1');&lt;BR /&gt;&lt;BR /&gt;  proc print data=sashelp.class noobs;&lt;BR /&gt;    title 'test3 ods excel mimetype=application/vnd.ms-excel';&lt;BR /&gt;  run; &lt;BR /&gt;ods _all_ close;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Oct 2022 19:28:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/840008#M6189</guid>
      <dc:creator>jins</dc:creator>
      <dc:date>2022-10-21T19:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya Job: Excel download</title>
      <link>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/840010#M6190</link>
      <description>&lt;P&gt;There is an excel download option in &lt;A href="https://datacontroller.io" target="_self"&gt;Data Controller for SAS&lt;/A&gt; - here is the SAS code behind the download service:&amp;nbsp;&amp;nbsp;&lt;A href="https://code.datacontroller.io/getrawdata_8sas.html" target="_blank"&gt;https://code.datacontroller.io/getrawdata_8sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It uses this macro directly:&amp;nbsp;&lt;A href="https://core.sasjs.io/mp__streamfile_8sas.html" target="_blank"&gt;https://core.sasjs.io/mp__streamfile_8sas.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Here's an extract:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;    filename &amp;amp;outref filesrvc parenturi="&amp;amp;SYS_JES_JOB_URI" name='_webout.xls'
      contenttype='application/vnd.ms-excel'
      contentdisp="attachment; filename=&amp;amp;outname";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This works fine for DC customers.&amp;nbsp; How exactly are you "running" the code?&amp;nbsp; Are you deploying it as a Job and opening the URL using the JES Web App with the appropriate _PROGRAM parameter?&lt;BR /&gt;&lt;BR /&gt;Or calling via the JES REST APIs?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 19:45:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/840010#M6190</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2022-10-21T19:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya Job: Excel download</title>
      <link>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/840017#M6191</link>
      <description>&lt;P&gt;deploying as a job and opening the URL using the JES Web App. What should be the _PROGRAM parameter in this case? It was a bit confusing in SAS docs...&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 20:20:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/840017#M6191</guid>
      <dc:creator>jins</dc:creator>
      <dc:date>2022-10-21T20:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya Job: Excel download</title>
      <link>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/840022#M6192</link>
      <description>&lt;P&gt;The `_program=/should/be/the/path/to/your/job/in/sas/drive` WITHOUT a .sas extension&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 20:37:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/840022#M6192</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2022-10-21T20:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya Job: Excel download</title>
      <link>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/840028#M6193</link>
      <description>&lt;P&gt;The parameter _output_type =none seems to suppress the creation of those links. Do you concur on this?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 20:46:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/840028#M6193</guid>
      <dc:creator>jins</dc:creator>
      <dc:date>2022-10-21T20:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya Job: Excel download</title>
      <link>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/841317#M6195</link>
      <description>&lt;P&gt;HI Allan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I migrated the stored process from 9.4 to Viya 3.5. I've the options of either creating html, xlsx and pdf as a drop down. Unable to figure out as to how to set the options for the automatic download for each of the reports based on selection. If I select _output_type='none' then I get the following error:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;ERROR: No logical assign for filename _WEBOUT.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;if I set&amp;nbsp;_output_type='ods_html5' or html, then I get the links of _webout.html and _webout.xls instead of automatic download for the selected report type. Any thoughts on this?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 15:16:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/841317#M6195</guid>
      <dc:creator>jins</dc:creator>
      <dc:date>2022-10-28T15:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya Job: Excel download</title>
      <link>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/841320#M6196</link>
      <description>&lt;P&gt;Hi jins - am happy to try and help but it may be easier to do this through a screen share.&amp;nbsp; Feel free to book a convenient slot with me using this link:&amp;nbsp; &lt;A href="https://4gl.uk/book" target="_blank"&gt;https://4gl.uk/book&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can then report back with the solution should we find one.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 15:34:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/841320#M6196</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2022-10-28T15:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya Job: Excel download</title>
      <link>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/841677#M6202</link>
      <description>&lt;P&gt;HI Allan,&lt;/P&gt;&lt;P&gt;I can set that up later with an example but had a question if the following can be streamed if i am using tagset.tableeditor? (i've set _output_type as none in parameter)&lt;/P&gt;&lt;PRE&gt;%if &amp;amp;outputtp=HTML %then %do;&lt;BR /&gt;* Create the Excel XML output and associate with the job;&lt;BR /&gt;	filename htmlfile filesrvc parenturi="&amp;amp;SYS_JES_JOB_URI"&lt;BR /&gt;	name='_webout.json'&lt;BR /&gt;	contenttype='text/html'&lt;BR /&gt;	contentdisp="attachment; filename=ok.html";&lt;BR /&gt;&lt;BR /&gt;	*ods html file=htmlfile;&lt;BR /&gt;    ods tagsets.tableeditor file='htmlfile'&lt;BR /&gt;    style=styles.MyStyle&lt;BR /&gt;    /*options(autofilter="YES" &lt;BR /&gt; 	        autofilter_table="1" &lt;BR /&gt;            autofilter_width="6em" &lt;BR /&gt; 	        autofilter_endcol= "7" &lt;BR /&gt;            frozen_headers="YES" &lt;BR /&gt;            frozen_rowheaders="YES" &lt;BR /&gt;            )*/ ; &lt;BR /&gt;	&lt;BR /&gt;	proc print data=sashelp.class noobs;&lt;BR /&gt;	   title 'Test ODS HTML';&lt;BR /&gt;	run; &lt;BR /&gt;    ods tagsets.tableeditor close;&lt;BR /&gt;    ods listing;&lt;BR /&gt;%end;&amp;nbsp; &amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 15:31:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/841677#M6202</guid>
      <dc:creator>jins</dc:creator>
      <dc:date>2022-10-31T15:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya Job: Excel download</title>
      <link>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/841679#M6203</link>
      <description>&lt;P&gt;You can stream ANYTHING you like!&amp;nbsp; Generally I'd look to create the file, then just stream it as it is, rather than using ODS but it should still work.&lt;BR /&gt;&lt;BR /&gt;I had a realisation about this - are you creating the Jobs manually (not using SASjs)?&lt;BR /&gt;&lt;BR /&gt;If so, have you set the option to remove the automatic JES macros?&amp;nbsp; `&lt;SPAN&gt;_addjesbeginendmacros=false`&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;These work similarly to the `stpbegin` and `stpend` macros in SAS EBI, and can affect the usability of the _webout destination.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 15:36:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/841679#M6203</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2022-10-31T15:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya Job: Excel download</title>
      <link>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/842093#M6205</link>
      <description>&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Say I created this file test.html in a location as follows....&lt;/P&gt;&lt;P&gt;ods tagsets.Tableeditor file='/xxxx/xxx/xx/test.html'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I call this created file (test.html) to download using the filename filesrvc statements?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your patience!&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 13:58:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-Viya-Job-Excel-download/m-p/842093#M6205</guid>
      <dc:creator>jins</dc:creator>
      <dc:date>2022-11-02T13:58:37Z</dc:date>
    </item>
  </channel>
</rss>

