<?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: How to use x command open Excel at background(invisible) in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-open-Excel-at-background-invisible/m-p/83596#M23993</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you get a solution mark the thread as being answered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given what you want to do, forget my previous advice of using app.minimize()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The answer is a bit convoluted, but works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, create a special shortcut for Excel.&amp;nbsp; I did that by going to where Excel was located on my computer, right clicked on it, and then clicked on create shortcut.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then created a folder, under Office11 (which I named test) and then dragged the shortcut to that folder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I right clicked on the shortcut and renamed it to be excel.&amp;nbsp; Then (still within properties) I set the value of run to be minimized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After doing that, I changed the SAS code to open that link rather than opening Excel directly.&amp;nbsp; Having done that, Excel never appeared on the screen, but everything was accomplished.&amp;nbsp; The code I ran was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let pw=abcdefg;&lt;/P&gt;&lt;P&gt;options noxwait noxsync;&lt;/P&gt;&lt;P&gt;x '"C:\Program Files\Microsoft Office\Office11\test\EXCEL.lnk"';&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; x=sleep(3);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;filename ExcelCmd dde 'Excel|system';&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; file ExcelCmd;&lt;/P&gt;&lt;P&gt;&amp;nbsp; s = '[open(' || quote ("c:\trialdata.xls.") ||",,,,""&amp;amp;pw."")]";&lt;/P&gt;&lt;P&gt;&amp;nbsp; put s;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Aug 2012 17:32:50 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2012-08-03T17:32:50Z</dc:date>
    <item>
      <title>How to open Excel at background(invisible)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-open-Excel-at-background-invisible/m-p/83593#M23990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I know we can use SAS x command to open outside file or application such as Excel using code 1 as follow:&lt;/P&gt;&lt;P&gt;Also we can use another method to open excel :see code 2&lt;/P&gt;&lt;P&gt;My question is Could we open Excel in &lt;STRONG&gt;background&lt;/STRONG&gt;? I mean open excel at &lt;STRONG&gt;invisible&lt;/STRONG&gt; status,,,if this is not available,,, open&amp;nbsp; excel at its minimized window status will be another alternative solution.&lt;/P&gt;&lt;P&gt;Because I don't want the opened excel appear and cover our SAS console.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options noxwait noxsync;&lt;/P&gt;&lt;P&gt;x '"C:\Program Files\Microsoft Office\Office12\EXCEL"';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code 2:&lt;/P&gt;&lt;P&gt;OPTIONS NOXWAIT NOXSYNC;&lt;/P&gt;&lt;P&gt;DATA _NULL_;&lt;/P&gt;&lt;P&gt;RC=SYSTEM('START EXCEL');&lt;/P&gt;&lt;P&gt;RC=SLEEP(3);&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 15:45:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-open-Excel-at-background-invisible/m-p/83593#M23990</guid>
      <dc:creator>Mike_Davis</dc:creator>
      <dc:date>2012-08-03T15:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use x command open Excel at background(invisible)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-open-Excel-at-background-invisible/m-p/83594#M23991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PUT '[app.minimize()]';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 15:58:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-open-Excel-at-background-invisible/m-p/83594#M23991</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-03T15:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to use x command open Excel at background(invisible)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-open-Excel-at-background-invisible/m-p/83595#M23992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Art,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The PUT function works well to minimize&amp;nbsp; a new opened excel file.&lt;BR /&gt;but how to minimize Excel console before opened an excel file?&lt;/P&gt;&lt;P&gt;because if we want to open a excel file ,at first we should open Excel console firstly use one of&amp;nbsp; the following SAS codes:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;options noxwait noxsync;&lt;/P&gt;&lt;P&gt;x '"C:\Program Files\Microsoft Office\Office12\EXCEL"';&lt;/P&gt;&lt;P&gt;or:&lt;/P&gt;&lt;P&gt;OPTIONS NOXWAIT NOXSYNC;&lt;BR /&gt;DATA _NULL_;&lt;BR /&gt;RC=SYSTEM('START EXCEL');&lt;BR /&gt;RC=SLEEP(5);&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;what I want to minimize firstly is the Excel console.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 16:26:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-open-Excel-at-background-invisible/m-p/83595#M23992</guid>
      <dc:creator>Mike_Davis</dc:creator>
      <dc:date>2012-08-03T16:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to use x command open Excel at background(invisible)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-open-Excel-at-background-invisible/m-p/83596#M23993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you get a solution mark the thread as being answered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given what you want to do, forget my previous advice of using app.minimize()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The answer is a bit convoluted, but works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, create a special shortcut for Excel.&amp;nbsp; I did that by going to where Excel was located on my computer, right clicked on it, and then clicked on create shortcut.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then created a folder, under Office11 (which I named test) and then dragged the shortcut to that folder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I right clicked on the shortcut and renamed it to be excel.&amp;nbsp; Then (still within properties) I set the value of run to be minimized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After doing that, I changed the SAS code to open that link rather than opening Excel directly.&amp;nbsp; Having done that, Excel never appeared on the screen, but everything was accomplished.&amp;nbsp; The code I ran was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let pw=abcdefg;&lt;/P&gt;&lt;P&gt;options noxwait noxsync;&lt;/P&gt;&lt;P&gt;x '"C:\Program Files\Microsoft Office\Office11\test\EXCEL.lnk"';&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; x=sleep(3);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;filename ExcelCmd dde 'Excel|system';&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; file ExcelCmd;&lt;/P&gt;&lt;P&gt;&amp;nbsp; s = '[open(' || quote ("c:\trialdata.xls.") ||",,,,""&amp;amp;pw."")]";&lt;/P&gt;&lt;P&gt;&amp;nbsp; put s;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 17:32:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-open-Excel-at-background-invisible/m-p/83596#M23993</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-03T17:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use x command open Excel at background(invisible)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-open-Excel-at-background-invisible/m-p/83597#M23994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Art,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also I found an option works well ,but just for mininize ,can't run at background or invisible:&lt;/P&gt;&lt;P&gt;options noxwait noxsync xmin;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 19:25:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-open-Excel-at-background-invisible/m-p/83597#M23994</guid>
      <dc:creator>Mike_Davis</dc:creator>
      <dc:date>2012-08-09T19:25:46Z</dc:date>
    </item>
  </channel>
</rss>

