<?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: Inserting Output of SAS Stored Process Into Excel Sheet Using VBA in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Inserting-Output-of-SAS-Stored-Process-Into-Excel-Sheet-Using/m-p/610959#M178025</link>
    <description>&lt;P&gt;Have you seen the examples in the documentation?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=amodg&amp;amp;docsetTarget=p1u415y2bdwtpsn1pt9hiyc27j45.htm&amp;amp;docsetVersion=8.0&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=amodg&amp;amp;docsetTarget=p1u415y2bdwtpsn1pt9hiyc27j45.htm&amp;amp;docsetVersion=8.0&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Dec 2019 12:22:11 GMT</pubDate>
    <dc:creator>JosvanderVelden</dc:creator>
    <dc:date>2019-12-11T12:22:11Z</dc:date>
    <item>
      <title>Inserting Output of SAS Stored Process Into Excel Sheet Using VBA</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Inserting-Output-of-SAS-Stored-Process-Into-Excel-Sheet-Using/m-p/610495#M177782</link>
      <description>&lt;P&gt;I am trying to get the output of the following SAS stored procedure to appear in an Excel sheet via a VBA macro.&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;proc sql;
 CREATE TABLE RV_LIST AS
 SELECT F_RS_DESC FROM FUTURA.to_rv_Sets WHERE F_RS_PROV_ID = 23 And UPPER(F_RS_DESC) LIKE '%LIVE RV%' ORDER BY F_RS_DATE DESC;
quit;
proc print DATA=RV_LIST;
run;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;Here is the VBA code I'm using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub UpdateDataValidation()
Dim DV As Worksheet
Dim SAS As SASExcelAddIn
Dim prompt As SASPrompts
Dim Output As Range
Dim data As SASDataView

Set DV = ThisWorkbook.Worksheets("Data Validation")
Set SAS = Application.COMAddIns.Item("SAS.ExcelAddIn").Object

SAS.InsertStoredProcess "/User Folders/rbarua/My Folder/RVListUpdate", DV.Range("A4")


End Sub&lt;/PRE&gt;&lt;P&gt;The VBA macro runs successfully and the output of the SAS stored process appears in the "SAS Add-In For Microsoft Office" pane on the right.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;However, I want the output to appear in cell A4 of the "Data Validation" worksheet. Can anyone spot why this is not happening?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 15:43:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Inserting-Output-of-SAS-Stored-Process-Into-Excel-Sheet-Using/m-p/610495#M177782</guid>
      <dc:creator>RowanB1986</dc:creator>
      <dc:date>2019-12-09T15:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting Output of SAS Stored Process Into Excel Sheet Using VBA</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Inserting-Output-of-SAS-Stored-Process-Into-Excel-Sheet-Using/m-p/610959#M178025</link>
      <description>&lt;P&gt;Have you seen the examples in the documentation?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=amodg&amp;amp;docsetTarget=p1u415y2bdwtpsn1pt9hiyc27j45.htm&amp;amp;docsetVersion=8.0&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=amodg&amp;amp;docsetTarget=p1u415y2bdwtpsn1pt9hiyc27j45.htm&amp;amp;docsetVersion=8.0&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 12:22:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Inserting-Output-of-SAS-Stored-Process-Into-Excel-Sheet-Using/m-p/610959#M178025</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2019-12-11T12:22:11Z</dc:date>
    </item>
  </channel>
</rss>

