<?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 Prompt window to select file path to import (SAS BASE) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Prompt-window-to-select-file-path-to-import-SAS-BASE/m-p/470768#M120486</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;Could anyone please help me with a code that will allow the user to brow to the location of an excel file to import to SAS?&lt;/P&gt;
&lt;P&gt;I am using SAS 9.4 Base (not EG)&lt;/P&gt;
&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards&lt;/P&gt;
&lt;P&gt;AM&lt;/P&gt;</description>
    <pubDate>Sat, 16 Jun 2018 07:57:57 GMT</pubDate>
    <dc:creator>ammarhm</dc:creator>
    <dc:date>2018-06-16T07:57:57Z</dc:date>
    <item>
      <title>Prompt window to select file path to import (SAS BASE)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Prompt-window-to-select-file-path-to-import-SAS-BASE/m-p/470768#M120486</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;Could anyone please help me with a code that will allow the user to brow to the location of an excel file to import to SAS?&lt;/P&gt;
&lt;P&gt;I am using SAS 9.4 Base (not EG)&lt;/P&gt;
&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards&lt;/P&gt;
&lt;P&gt;AM&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jun 2018 07:57:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Prompt-window-to-select-file-path-to-import-SAS-BASE/m-p/470768#M120486</guid>
      <dc:creator>ammarhm</dc:creator>
      <dc:date>2018-06-16T07:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt window to select file path to import (SAS BASE)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Prompt-window-to-select-file-path-to-import-SAS-BASE/m-p/470784#M120492</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If you are already using Base SAS 9.4, the Windowing Environment has an Import Data menu option that allows you to browse to the location of a file to import: File --&amp;gt; Import Data --&amp;gt; and then follow the prompts in the Import Window:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dms_import_data.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21228iD4664A9CB4D27B72/image-size/large?v=v2&amp;amp;px=999" role="button" title="dms_import_data.png" alt="dms_import_data.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Hope this helps,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jun 2018 13:27:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Prompt-window-to-select-file-path-to-import-SAS-BASE/m-p/470784#M120492</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-06-16T13:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt window to select file path to import (SAS BASE)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Prompt-window-to-select-file-path-to-import-SAS-BASE/m-p/470785#M120493</link>
      <description>&lt;P&gt;Thanks Cynthia&lt;/P&gt;
&lt;P&gt;I am aware of the import functionality through the drop-down menu, I was however looking for achieving something similar using the code itself.&lt;/P&gt;
&lt;P&gt;I have looked into %window but not sure I can get a pop up menu with a browse button to allow the user to choose the path of the excel file.&lt;/P&gt;
&lt;P&gt;The issue is that the excel file will contain multiple sheets, so i was trying to capture the file path through a prompt to the user, then use proc import to import all the sheets from the excel file&lt;/P&gt;
&lt;P&gt;Thanks again&lt;/P&gt;
&lt;P&gt;AM&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jun 2018 13:34:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Prompt-window-to-select-file-path-to-import-SAS-BASE/m-p/470785#M120493</guid>
      <dc:creator>ammarhm</dc:creator>
      <dc:date>2018-06-16T13:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt window to select file path to import (SAS BASE)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Prompt-window-to-select-file-path-to-import-SAS-BASE/m-p/470788#M120494</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I do not believe that %WINDOW will allow you to implement a browse button, because the browse button would have to go out to the operating system and then return the results to the %WINDOW program. This is probably a question for Tech Support. I don't actually recommend using %WINDOW because it has limited usefulness in a client/server scenario. You might try investigating SAS Studio, you can build your own tasks and, in fact, there is an Import Task that you might even be able to start with as a model. It was my understanding that SAS Studio was available with Base 9.4 -- when I installed the latest version of SAS 9.4, I got all 3 interfaces: SAS on Windows, SAS EG and SAS Studio. Here's what the Import Task looks like in SAS Studio:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="studio_import_task.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21229i3446D7119D75C117/image-size/large?v=v2&amp;amp;px=999" role="button" title="studio_import_task.png" alt="studio_import_task.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jun 2018 13:50:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Prompt-window-to-select-file-path-to-import-SAS-BASE/m-p/470788#M120494</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-06-16T13:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt window to select file path to import (SAS BASE)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Prompt-window-to-select-file-path-to-import-SAS-BASE/m-p/470811#M120500</link>
      <description>&lt;P&gt;If you're going to need prompts I would suggest switching to SAS EG or Studio or AddIn for Microsoft Office.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise you're stuck rolling your own via JavaScript or another application interface. SAS Base is not designed for interactive solutions like this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Usually, if it's base I have parameters at the top and people have to copy/paste in the path. &amp;nbsp;To import all sheets, you can use the XLSX libname approach and PROC COPY. This should copy all the sheets with data to the WORK library.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let pathFileImport = C:\_localdata\temp\Demo.xlsx;


libname demo xlsx "&amp;amp;pathFileImport";

proc copy in=demo out=work;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 16 Jun 2018 22:45:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Prompt-window-to-select-file-path-to-import-SAS-BASE/m-p/470811#M120500</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-16T22:45:05Z</dc:date>
    </item>
  </channel>
</rss>

