<?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: Problem of import a 2003 excel file with password into SAS if use macro variable to express password in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Problem-of-import-a-2003-excel-file-with-password-into-SAS-if/m-p/83477#M23977</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try it with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s = '[open(' || quote ("c:\temp\book1.xls.") ||",,,,""&amp;amp;pw."")]";&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Aug 2012 13:35:07 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2012-08-03T13:35:07Z</dc:date>
    <item>
      <title>Problem of import a 2003 excel file with password into SAS if use macro variable to express password</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-of-import-a-2003-excel-file-with-password-into-SAS-if/m-p/83475#M23975</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;&lt;/P&gt;&lt;P&gt;I try to open a password protected excel file as the following SAS code,,,everything works but only problem will happen when I try to use macro variable denotes the password.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose the password of the excel file c:\temp\book1.xls&amp;nbsp; is abcdefg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please look into SAS code ,I add my question there at ""s = '[open(' || quote ("c:\temp\book1.xls.") ||',,,,"abcdefg")]';""&amp;nbsp;&amp;nbsp; (I want use macro variable express abcdefg will cause problem).&lt;/P&gt;&lt;P&gt;&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;options noxwait noxsync;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; x '"C:\Program Files\Microsoft Office\Office12\EXCEL"';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data _null_;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x=sleep(3);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; filename ExcelCmd dde 'Excel|system';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data _null_;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file ExcelCmd;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; length s $200;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s = '[open(' || quote ("c:\temp\book1.xls.") ||',,,,"&lt;SPAN style="color: #575757;"&gt;&lt;STRONG&gt;abcdefg&lt;/STRONG&gt;&lt;/SPAN&gt;")]'; /*-------------My question is here,the password is "abcdefg",but I want use a macro variable replace the real password,such as&amp;nbsp; I want use %let pw=abcdefg,and here I use &amp;amp;pw instead of abcdefg,but a problem will happen-----------------------*/&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put s;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 21:25:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-of-import-a-2003-excel-file-with-password-into-SAS-if/m-p/83475#M23975</guid>
      <dc:creator>Mike_Davis</dc:creator>
      <dc:date>2012-08-02T21:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem of import a 2003 excel file with password into SAS if use macro variable to express password</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-of-import-a-2003-excel-file-with-password-into-SAS-if/m-p/83476#M23976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not familiar with DDE, but have much experience converting code to use macro variables. Try enclosing the DDE command in double quotes instead of single quotes. The single quotes are probably preventing the resolution of the macro &amp;amp;pw, so the proper password does not get passed to Excel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 13:19:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-of-import-a-2003-excel-file-with-password-into-SAS-if/m-p/83476#M23976</guid>
      <dc:creator>FloydNevseta</dc:creator>
      <dc:date>2012-08-03T13:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem of import a 2003 excel file with password into SAS if use macro variable to express password</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-of-import-a-2003-excel-file-with-password-into-SAS-if/m-p/83477#M23977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try it with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s = '[open(' || quote ("c:\temp\book1.xls.") ||",,,,""&amp;amp;pw."")]";&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 13:35:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-of-import-a-2003-excel-file-with-password-into-SAS-if/m-p/83477#M23977</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-03T13:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem of import a 2003 excel file with password into SAS if use macro variable to express password</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-of-import-a-2003-excel-file-with-password-into-SAS-if/m-p/83478#M23978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Art,this works !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 13:58:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-of-import-a-2003-excel-file-with-password-into-SAS-if/m-p/83478#M23978</guid>
      <dc:creator>Mike_Davis</dc:creator>
      <dc:date>2012-08-03T13:58:51Z</dc:date>
    </item>
  </channel>
</rss>

