<?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 password protect excel files from SAS EG? in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-password-protect-excel-files-from-SAS-EG/m-p/211948#M15861</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; You have answered your own question when you said: &lt;STRONG&gt;"this code doesn't work in SAS EG as DDE is not supported on SAS EG." &lt;/STRONG&gt;Here's a blog post explaining why DDE is not supported with EG:&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/2014/10/14/dde-is-doa/" title="http://blogs.sas.com/content/sasdummy/2014/10/14/dde-is-doa/"&gt;http://blogs.sas.com/content/sasdummy/2014/10/14/dde-is-doa/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You might investigate creating the file and then writing an Excel macro or VB Script to set the password.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 29 Mar 2015 18:06:46 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2015-03-29T18:06:46Z</dc:date>
    <item>
      <title>how to password protect excel files from SAS EG?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-password-protect-excel-files-from-SAS-EG/m-p/211947#M15860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;i used to create password protected excel files in base SAS using DDE. Can any one guide me how to create password protected excel files in SAS EG, following code( got it from SAS support page) which i used in base SAS, this code doesn't work in SAS EG as DDE is not supported on SAS EG. my client is using SAS EG 6.1 which runs on SAS 9.4&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;%macro writpass(xlsfile1,xlsfile2,password,sasfile,deleteit);&lt;BR /&gt;options macrogen symbolgen mprint nocaps;&lt;BR /&gt;options noxwait noxsync;&lt;BR /&gt;&amp;nbsp; * First, SAS writes an Excel file here without the password. *;&lt;BR /&gt;proc export outfile="&amp;amp;xlsfile1" data=&amp;amp;sasfile dbms=excel replace;&lt;BR /&gt;run;&amp;nbsp;&lt;BR /&gt;quit;&lt;BR /&gt;&amp;nbsp; * This next routine starts the Excel application. *;&lt;BR /&gt;filename cmds dde 'excel|system';&lt;BR /&gt;x "'C:\Program Files\Microsoft Office\Office11\excel.exe'";&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data &lt;U&gt;null&lt;/U&gt;;&lt;BR /&gt;&amp;nbsp; x=sleep(3);&lt;BR /&gt;run;&lt;BR /&gt;&amp;nbsp; * SAS opens the Excel worksheet with its password. &lt;STRONG&gt;;&amp;lt;br&amp;gt;filename cmds dde 'excel|system';&amp;lt;br&amp;gt;data &lt;U&gt;null&lt;/U&gt;;&amp;lt;br&amp;gt;&amp;nbsp; file cmds;&amp;lt;br&amp;gt;&amp;nbsp; put '[open("'"&amp;amp;amp;xlsfile1"'")]';&amp;lt;br&amp;gt;run;&amp;lt;br&amp;gt;&lt;/STRONG&gt; SAS saves the file without the password. &lt;STRONG&gt;;&amp;lt;br&amp;gt;data &lt;U&gt;null&lt;/U&gt;;&amp;lt;br&amp;gt;&amp;nbsp; file cmds;&amp;lt;br&amp;gt;&amp;nbsp; put '[error("false")]';&amp;lt;br&amp;gt;&amp;nbsp; put '[save.as("'"&amp;amp;amp;xlsfile2"'",1,"'"&amp;amp;amp;password"'")]';&amp;nbsp;&amp;lt;br&amp;gt;&amp;nbsp; put '[quit]';&amp;lt;br&amp;gt;run;&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;&lt;/STRONG&gt; Then SAS destroys the Excel file that is not password protected. *;&lt;BR /&gt;%if &amp;amp;deleteit=yes %then %do;&lt;BR /&gt;&amp;nbsp; systask command "del ""&amp;amp;xlsfile1"" ";&lt;BR /&gt;%end;&lt;BR /&gt;%mend writpass;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 17:43:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-password-protect-excel-files-from-SAS-EG/m-p/211947#M15860</guid>
      <dc:creator>sheru</dc:creator>
      <dc:date>2015-03-27T17:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to password protect excel files from SAS EG?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-password-protect-excel-files-from-SAS-EG/m-p/211948#M15861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; You have answered your own question when you said: &lt;STRONG&gt;"this code doesn't work in SAS EG as DDE is not supported on SAS EG." &lt;/STRONG&gt;Here's a blog post explaining why DDE is not supported with EG:&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/2014/10/14/dde-is-doa/" title="http://blogs.sas.com/content/sasdummy/2014/10/14/dde-is-doa/"&gt;http://blogs.sas.com/content/sasdummy/2014/10/14/dde-is-doa/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You might investigate creating the file and then writing an Excel macro or VB Script to set the password.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Mar 2015 18:06:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-password-protect-excel-files-from-SAS-EG/m-p/211948#M15861</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-03-29T18:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to password protect excel files from SAS EG?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-password-protect-excel-files-from-SAS-EG/m-p/211949#M15862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This might be helpful. It would probably work for EXPORTed spreadsheets as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/48/682.html" title="http://support.sas.com/kb/48/682.html"&gt;48682 - Add password protection to Excel workbooks that are generated using the ExcelXP tagset&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Mar 2015 19:13:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-password-protect-excel-files-from-SAS-EG/m-p/211949#M15862</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-03-29T19:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to password protect excel files from SAS EG?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-password-protect-excel-files-from-SAS-EG/m-p/211950#M15863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H5&gt;Hello Cynthia@sas, Thank you. i know we cant work with DDE any more in EG, I am trying to know is there any other way we can generate password protected excel files from SAS.&lt;/H5&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2015 14:59:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-password-protect-excel-files-from-SAS-EG/m-p/211950#M15863</guid>
      <dc:creator>sheru</dc:creator>
      <dc:date>2015-03-30T14:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to password protect excel files from SAS EG?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-password-protect-excel-files-from-SAS-EG/m-p/211951#M15864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello SASKiwi, Thank you for the article, i will try to implement it and update the results. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2015 15:00:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-password-protect-excel-files-from-SAS-EG/m-p/211951#M15864</guid>
      <dc:creator>sheru</dc:creator>
      <dc:date>2015-03-30T15:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to password protect excel files from SAS EG?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-password-protect-excel-files-from-SAS-EG/m-p/211952#M15865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; You may need help from your SAS Admin to allow the X command. That is usually disabled for EG users.&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 16:52:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-password-protect-excel-files-from-SAS-EG/m-p/211952#M15865</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-03-31T16:52:25Z</dc:date>
    </item>
  </channel>
</rss>

