<?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: Can we import password protected excel files in SAS Enterprise guide in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/278135#M19230</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi﻿&lt;/a&gt;I saw some code where they are using vbs script and pipe to load data into sas. I might be wrong in my assumption that it uses xcmd option.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please give details on DDE option you mentioned. I have read a few documents on the DDE method but have some doubts. Should microsoft excel be installed on server or on user machine and will it work if Allow XCMD option is unchecked in sas server. Sorry if these are idiotic questions as this is a completely new method for me and need to understand the pros and cons.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jun 2016 08:54:59 GMT</pubDate>
    <dc:creator>naveenraj</dc:creator>
    <dc:date>2016-06-17T08:54:59Z</dc:date>
    <item>
      <title>Can we import password protected excel files in SAS Enterprise guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/277918#M19221</link>
      <description>&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to import password protected excel files into sas enterprise guide. I think we can do it with 'Allow XCMD' option enabled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But is it possible to do it if that option is not enabled in the system. Curently in our environment this option is not enabled and our admins are reluctant to enable it citing security concerns.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 14:52:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/277918#M19221</guid>
      <dc:creator>naveenraj</dc:creator>
      <dc:date>2016-06-16T14:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can we import password protected excel files in SAS Enterprise guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/278015#M19226</link>
      <description>&lt;P&gt;I don't think you can do this with either the EG import wizard or with SAS/ACCESS to PC Files (PROC IMPORT, LIBNAME). DDE might work but you can't use that in EG.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How are you intending to do it with X commands?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 19:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/278015#M19226</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-06-16T19:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can we import password protected excel files in SAS Enterprise guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/278135#M19230</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi﻿&lt;/a&gt;I saw some code where they are using vbs script and pipe to load data into sas. I might be wrong in my assumption that it uses xcmd option.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please give details on DDE option you mentioned. I have read a few documents on the DDE method but have some doubts. Should microsoft excel be installed on server or on user machine and will it work if Allow XCMD option is unchecked in sas server. Sorry if these are idiotic questions as this is a completely new method for me and need to understand the pros and cons.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2016 08:54:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/278135#M19230</guid>
      <dc:creator>naveenraj</dc:creator>
      <dc:date>2016-06-17T08:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can we import password protected excel files in SAS Enterprise guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/278169#M19231</link>
      <description>&lt;P&gt;Here's a trick you can&amp;nbsp;&lt;STRONG&gt;try &lt;/STRONG&gt;for an interactive import task.&amp;nbsp; SAS Enterprise Guide can read the content of a password-protected file&amp;nbsp;&lt;STRONG&gt;IF&lt;/STRONG&gt; you open it with Excel first. &amp;nbsp;So:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Open the file in Microsoft Excel and specify the password.&lt;/P&gt;
&lt;P&gt;2. Use the SAS Enterprise Guide File-&amp;gt;Import Data task to read the same Excel file, while it's still open in Excel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Neither SAS Enterprise Guide nor PROC IMPORT can read password-protected Excel files. &amp;nbsp;If you need to run this in a "batch" mode then I think you're correct -- you would need to "delegate" the opening/reading of the Excel file to an external process, probably Excel itself, and then pipe the results into SAS. &amp;nbsp;VB Script is one approach; Windows PowerShell is another.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;objExcel = new-object -comobject excel.application
$objExcel.Workbooks.Open("yourfile.xlsx",0,$False,‌​1,"password")&lt;/PRE&gt;
&lt;P&gt;You could then use PowerShell to save the workbook without a password (into a temp space) and then use SAS to import, or save the sheet you want as CSV, or read the records from Excel and pipe them into SAS as input records.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2016 12:38:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/278169#M19231</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-06-17T12:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Can we import password protected excel files in SAS Enterprise guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/278239#M19232</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/66186"&gt;@naveenraj&lt;/a&gt; I'm sure that you can solve your issue somehow,  but perhaps the question should be a different one. &lt;BR /&gt;From my point of view the obvious solution is not to use passwords on file level. It's a crappy security solution. Instead, store the file in a secure location with appropriate access rights.</description>
      <pubDate>Fri, 17 Jun 2016 16:21:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/278239#M19232</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-06-17T16:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can we import password protected excel files in SAS Enterprise guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/278705#M19240</link>
      <description>&lt;P&gt;Along the lines of saving you password protected file to a restricted access folder without excel passwords, the VBA script below will remove the workbook and worksheet passwords&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have full local SAS you should be able to execute this code from SAS or SAS calling R.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Sub ChDirNet(szPath As String)
    SetCurrentDirectoryA szPath
End Sub

Sub RemovePasswords()

    Dim SaveDriveDir As String
    Dim FName As Variant
    Dim FNum As Long
    Dim mybook As Workbook, ws As Worksheet
    Dim workbookpass As String
    Dim sheetpass As String


workbookpass = ThisWorkbook.Sheets(1).Range("B1").Value
sheetpass = ThisWorkbook.Sheets(1).Range("B2").Value

    SaveDriveDir = CurDir
    ChDir ThisWorkbook.Path

    FName = Application.GetOpenFilename(FileFilter:="Excel Files (*.xl*), *.xl*", _
                                        MultiSelect:=True)

    If IsArray(FName) Then
        For FNum = LBound(FName) To UBound(FName)
                Set mybook = Nothing
                Set mybook = Workbooks.Open(FName(FNum), UpdateLinks:=0, ReadOnly:=False, Password:=workbookpass)

                On Error GoTo 0
        If Not mybook Is Nothing Then
            On Error Resume Next
            With mybook
                mybook.Unprotect Password:=sheetpass
                For Each ws In Worksheets
                    ws.Unprotect Password:=sheetpass
                Next ws
            End With
    Application.DisplayAlerts = False
            mybook.SaveAs Password:=""
            mybook.Close
    Application.DisplayAlerts = True
        End If
        Next FNum
    End If

End Sub&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Jun 2016 14:59:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/278705#M19240</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2016-06-20T14:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: Can we import password protected excel files in SAS Enterprise guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/279722#M19277</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger﻿&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i tried your method to&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Open the file in Microsoft Excel and specify the password.&lt;/P&gt;&lt;P&gt;2) Use the SAS Enterprise Guide File-&amp;gt;Import Data task to read the same Excel file, while it's still open in Excel.&lt;/P&gt;&lt;P&gt;I am getting the attached error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a client-server model. Is it a requirement that microsoft office should be installed in the server also for this method to work. &amp;nbsp;I have excel 2007 installed on my local desktop.&lt;/P&gt;&lt;P&gt;Also, Allow xcmd option is diabled, so even with dde we wont be able to import. Please correct me if i am wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Naveen&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12687i347C778C5D7D78C0/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="excelimporterror.PNG" title="excelimporterror.PNG" /&gt;</description>
      <pubDate>Thu, 23 Jun 2016 12:55:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/279722#M19277</guid>
      <dc:creator>naveenraj</dc:creator>
      <dc:date>2016-06-23T12:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can we import password protected excel files in SAS Enterprise guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/279750#M19279</link>
      <description>&lt;P&gt;Are you using 64-bit Enterprise Guide and 32-bit MS Office? &amp;nbsp;That might be the issue for this case, where EG cannot use the local data providers to get access to your Excel file directly.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I think you're going to have to find a way to strip away the password from the Excel file (perhaps in a copy) before importing into EG.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 15:03:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/279750#M19279</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-06-23T15:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can we import password protected excel files in SAS Enterprise guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/279752#M19280</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger﻿&lt;/a&gt;Yes &amp;nbsp;i am using 2007 excel. it should be 32&amp;nbsp;bit version as &lt;SPAN&gt;64-bit applications for Office are available only for Office 2010.&lt;/SPAN&gt;. That is the reason i am getting the error. &amp;nbsp;One doubt regarding this. Why am i not getting any similar error when using import for excel files without any password protection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you were saying to strip away the password, is it possible using VBscripts. Can you please give details. This is not my area of expertise. So i am asking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2016 08:16:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/279752#M19280</guid>
      <dc:creator>naveenraj</dc:creator>
      <dc:date>2016-06-24T08:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can we import password protected excel files in SAS Enterprise guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/810814#M40623</link>
      <description>&lt;P&gt;Another option (and, full transparency - we built the product) is &lt;A href="https://datacontroller.io" target="_self"&gt;Data Controller for SAS®&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will let you upload any password protected excel file into any target (SAS dataset, CAS or database table).&amp;nbsp; The excel is opened in the browser, and the raw data uploaded to SAS - where you can access it from Enterprise Guide.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a video:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;div class="video-embed-center video-embed"&gt;&lt;iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fb2lfBCkdvBI%3Ffeature%3Doembed&amp;amp;display_name=YouTube&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Db2lfBCkdvBI&amp;amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fb2lfBCkdvBI%2Fhqdefault.jpg&amp;amp;type=text%2Fhtml&amp;amp;schema=youtube" width="400" height="225" scrolling="no" title="Loading Password Protected Excel into SAS" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2022 14:00:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Can-we-import-password-protected-excel-files-in-SAS-Enterprise/m-p/810814#M40623</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2022-04-30T14:00:06Z</dc:date>
    </item>
  </channel>
</rss>

