<?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: Generate the excel file from code in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Generate-the-excel-file-from-code/m-p/918152#M17888</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/20670"&gt;@KeithM&lt;/a&gt;&amp;nbsp; for your great explanation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but there are bunch of question I have.&lt;/P&gt;
&lt;P&gt;1. Can we change the appearance of _webout.html and _webout.xlsx to like download excel here so the user can understand click there to download excel.&lt;/P&gt;
&lt;P&gt;2. Is&amp;nbsp;&lt;SPAN&gt;&amp;amp;SYS_JES_JOB_URI only resolves&amp;nbsp;in SASJobExecution ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also I didn't get your last point about&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://va85.trc.sas.com/files/files/1ca57a92-eb44-41c8-8330-66fb08921713/content" target="_blank" rel="noopener nofollow noreferrer"&gt;_webout.html&lt;/A&gt;&lt;/STRONG&gt;&amp;nbsp;, can you please narrow it down?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Feb 2024 06:31:12 GMT</pubDate>
    <dc:creator>Deep04</dc:creator>
    <dc:date>2024-02-28T06:31:12Z</dc:date>
    <item>
      <title>Generate the excel file from code</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Generate-the-excel-file-from-code/m-p/917999#M17884</link>
      <description>&lt;P&gt;Can someone please explain me the following code,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;filename excelout filesrvc &lt;BR /&gt;parenturi="&amp;amp;SYS_JES_JOB_URI"&amp;nbsp;&lt;BR /&gt;name='_webout.xlsx'&amp;nbsp;&lt;BR /&gt;contenttype='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'&amp;nbsp;&lt;BR /&gt;contentdisp='attachment; filename="my_excel_file.xlsx"';&amp;nbsp;&lt;BR /&gt;;&lt;BR /&gt;ods excel file=excelout style=htmlblue&lt;BR /&gt;options(sheet_name="Receipt Data" embedded_titles='yes');&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 07:31:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Generate-the-excel-file-from-code/m-p/917999#M17884</guid>
      <dc:creator>Deep04</dc:creator>
      <dc:date>2024-02-27T07:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Generate the excel file from code</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Generate-the-excel-file-from-code/m-p/918049#M17885</link>
      <description>&lt;P&gt;1. from the code, it is unknow where your Excel file is located so in order for me to get it to work, I needed to point to an Excel file in metadata.&amp;nbsp; I went to SAS Drive and looked for an existing spreadsheet.&amp;nbsp; Then looked at the properties to get the uri.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;filename excelout filesrvc &lt;STRONG&gt;'/files/files/5bb9d9bd-1b4f-4d04-8fb2-4e0992d1aaf7'&lt;/STRONG&gt;&lt;BR /&gt;parenturi="&amp;amp;SYS_JES_JOB_URI" &lt;BR /&gt;name='_webout.xlsx' &lt;BR /&gt;contenttype='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' &lt;BR /&gt;contentdisp='attachment; filename="my_excel_file.xlsx"'; &lt;BR /&gt;;&lt;BR /&gt;ods excel file=excelout style=htmlblue&lt;BR /&gt;options(sheet_name="Receipt Data" embedded_titles='yes');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. I created a Job in ..../SASJobExecution app.&amp;nbsp; When I run the job, I get:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KeithM_0-1709048194370.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/94148i60BC81A60B18506D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KeithM_0-1709048194370.png" alt="KeithM_0-1709048194370.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;3. When you click on _webout.xlsx, you are prompted to download the file&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KeithM_1-1709048378054.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/94149i02A93B1237034D24/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KeithM_1-1709048378054.png" alt="KeithM_1-1709048378054.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I suspect the &lt;STRONG&gt;&lt;A href="https://va85.trc.sas.com/files/files/1ca57a92-eb44-41c8-8330-66fb08921713/content" target="_blank" rel="noopener"&gt;_webout.html&lt;/A&gt;&lt;/STRONG&gt; is in reference to the parenturi option specified.&amp;nbsp; I suspect if you were linking to this code from another web page then that would be similar to a back button.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In regards to a definition of everything in the code, I reached out to ChatGPT for a decent definition:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;FROM CHATGPT:&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV class="flex-1 overflow-hidden"&gt;
&lt;DIV class="react-scroll-to-bottom--css-lifhb-79elbk h-full"&gt;
&lt;DIV class="react-scroll-to-bottom--css-lifhb-1n7m0yu"&gt;
&lt;DIV class="flex flex-col text-sm pb-9"&gt;
&lt;DIV class="w-full text-token-text-primary" data-testid="conversation-turn-2"&gt;
&lt;DIV class="px-4 py-2 justify-center text-base md:gap-6 m-auto"&gt;
&lt;DIV class="flex flex-1 text-base mx-auto gap-3 md:px-5 lg:px-1 xl:px-5 md:max-w-3xl lg:max-w-[40rem] xl:max-w-[48rem] group final-completion"&gt;
&lt;DIV class="flex-shrink-0 flex flex-col relative items-end"&gt;
&lt;DIV&gt;
&lt;DIV class="pt-0.5"&gt;
&lt;DIV class="gizmo-shadow-stroke flex h-6 w-6 items-center justify-center overflow-hidden rounded-full"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="relative flex w-full flex-col agent-turn"&gt;
&lt;DIV class="font-semibold select-none"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="flex-col gap-1 md:gap-3"&gt;
&lt;DIV class="flex flex-grow flex-col max-w-full"&gt;
&lt;DIV class="min-h-[20px] text-message flex flex-col items-start gap-3 whitespace-pre-wrap break-words [.text-message+&amp;amp;]:mt-5 overflow-x-auto" data-message-author-role="assistant" data-message-id="86357d88-1a93-463c-86e3-68380dcc8938"&gt;
&lt;DIV class="markdown prose w-full break-words dark:prose-invert light"&gt;
&lt;P&gt;The provided SAS ODS (Output Delivery System) code is used to generate an Excel file with the name "my_excel_file.xlsx" and a sheet named "Receipt Data." Let's break down the code:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;CODE&gt;filename excelout&lt;/CODE&gt;: Specifies the filename and file location for the Excel output.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;CODE&gt;filesrvc&lt;/CODE&gt;: Specifies that the file is to be stored on the server.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;CODE&gt;parenturi="&amp;amp;SYS_JES_JOB_URI"&lt;/CODE&gt;: Specifies the parent URI for the file. &lt;CODE&gt;&amp;amp;SYS_JES_JOB_URI&lt;/CODE&gt; is a system macro variable that provides the URI of the job.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;CODE&gt;name='_webout.xlsx'&lt;/CODE&gt;: Specifies the name of the Excel file to be created, which is '_webout.xlsx'.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;CODE&gt;contenttype='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'&lt;/CODE&gt;: Specifies the content type for&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="min-h-[20px] text-message flex flex-col items-start gap-3 whitespace-pre-wrap break-words [.text-message+&amp;amp;]:mt-5 overflow-x-auto" data-message-author-role="assistant" data-message-id="aec860f5-96a6-4781-ab45-88dd255a644a"&gt;
&lt;DIV class="markdown prose w-full break-words dark:prose-invert light"&gt;
&lt;P&gt;the HTTP response header. In this case, it indicates that the content is an Excel file in the Office Open XML format.&lt;/P&gt;
&lt;OL start="6"&gt;
&lt;LI&gt;
&lt;P&gt;&lt;CODE&gt;contentdisp='attachment; filename="my_excel_file.xlsx"';&lt;/CODE&gt;: Specifies the content disposition for the HTTP response header. It sets the disposition type to 'attachment', indicating that the content should be treated as an attachment. The filename parameter is set to "my_excel_file.xlsx."&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;CODE&gt;ods excel file=excelout&lt;/CODE&gt;: Opens the ODS Excel destination and directs the output to the file defined by the &lt;CODE&gt;excelout&lt;/CODE&gt; filename statement.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;CODE&gt;style=htmlblue&lt;/CODE&gt;: Specifies the style for the Excel output. In this case, it uses the 'htmlblue' style.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;CODE&gt;options(sheet_name="Receipt Data" embedded_titles='yes');&lt;/CODE&gt;: Specifies additional options for the Excel output. It sets the sheet name to "Receipt Data" and enables embedded titles in the Excel sheet.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;In summary, this SAS code generates an Excel file named "my_excel_file.xlsx" with a sheet named "Receipt Data." The Excel file is stored on the server, and the HTTP response header indicates that it should be treated as an attachment with the specified filename. The style 'htmlblue' is applied to the Excel output, and embedded titles are enabled in the sheet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="w-full pt-2 md:pt-0 dark:border-white/20 md:border-transparent md:dark:border-transparent md:w-[calc(100%-.5rem)]"&gt;&lt;FORM class="stretch mx-2 flex flex-row gap-3 last:mb-2 md:mx-4 md:last:mb-6 lg:mx-auto lg:max-w-2xl xl:max-w-3xl"&gt;
&lt;DIV class="relative flex h-full flex-1 flex-col"&gt;
&lt;DIV class="flex w-full items-center"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/FORM&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 15:53:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Generate-the-excel-file-from-code/m-p/918049#M17885</guid>
      <dc:creator>KeithM</dc:creator>
      <dc:date>2024-02-27T15:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Generate the excel file from code</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Generate-the-excel-file-from-code/m-p/918152#M17888</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/20670"&gt;@KeithM&lt;/a&gt;&amp;nbsp; for your great explanation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but there are bunch of question I have.&lt;/P&gt;
&lt;P&gt;1. Can we change the appearance of _webout.html and _webout.xlsx to like download excel here so the user can understand click there to download excel.&lt;/P&gt;
&lt;P&gt;2. Is&amp;nbsp;&lt;SPAN&gt;&amp;amp;SYS_JES_JOB_URI only resolves&amp;nbsp;in SASJobExecution ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also I didn't get your last point about&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://va85.trc.sas.com/files/files/1ca57a92-eb44-41c8-8330-66fb08921713/content" target="_blank" rel="noopener nofollow noreferrer"&gt;_webout.html&lt;/A&gt;&lt;/STRONG&gt;&amp;nbsp;, can you please narrow it down?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 06:31:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Generate-the-excel-file-from-code/m-p/918152#M17888</guid>
      <dc:creator>Deep04</dc:creator>
      <dc:date>2024-02-28T06:31:12Z</dc:date>
    </item>
  </channel>
</rss>

