Learning SAS? Welcome to the exclusive online community for all SAS learners.

How to import excel file located on drive D:

Reply
New Contributor
Posts: 2

How to import excel file located on drive D:

If I want to use old SAS-Programs like that below in the Unversity Edition how can I conect to the excel file located elswher as in "C:\SASUniversityEdition\myfolders". This would be quit nice because I want to keep my old folder structure moving from SAS 9.3 to SASUniversty Edition.

Is there any solution?

Original SAS 9.3 code works well with SAS 9.3

PROC IMPORT OUT= WORK.Test

            DATAFILE= "D:\DNPW\Ma15\EQPP_Gr4\Data.xlsx"

            DBMS=EXCEL REPLACE;

     RANGE="Tabelle1$";

     GETNAMES=YES;

     MIXED=NO;

     SCANTEXT=YES;

     USEDATE=YES;

     SCANTIME=YES;

RUN;

I am able to do this:

Moving the excel file to the "C:\SASUniversityEdition\myfolders" then import data

then importing the file like below works but it is not what I want.

PROC IMPORT DATAFILE="/folders/myfolders/Data.xls"

            OUT=WORK.Test

            DBMS=XLS

            REPLACE;

RUN;

I changed the settings in the VMware enabeling the appropriate folder as shared Folders then trying to adopt the path in the import statement like below (even some other sturcturs tried) but it doesn't work.

PROC IMPORT DATAFILE="/folders/myfolders/DNPW/Ma15/EQPP_Gr4/Data.xls"

            OUT=WORK.Test

            DBMS=XLS

            REPLACE;

RUN;

???

Many thanks in advance

Christian

then a further problem occurs I can't save the prorgamm code to the same folder (on drive DSmiley Happy where I store the data

Super User
Posts: 17,828

Re: How to import excel file located on drive D:

Why would you move from SAS 9.3 to SAS UE? It's a crippled version, intended for learning.

New Contributor
Posts: 2

Re: How to import excel file located on drive D:

Dear Reeza,

The motivation to move is that we teach more and more students coming from developing countries, who then would like to have free access to a statistic software and I would not like to give the advice to change file structures just because of the software version.

Occasional Contributor
Posts: 12

Re: How to import excel file located on drive D:

Hello CKDNPW

  Here is one possible resolution in case you were still seeking one.

Download and install SAS PC Files Server from SAS. Use the profile userid and password

you created when downloading and installing SAS UE if requested. Do not install into

the SAS UE folder,follow the website instructions.

 

PROC IMPORT OUT=work.YourOutputDsn

            DBMS=EXCELCS REPLACE

   FILE='DriveLetter:\..\YourFilename.xlsx';

   SERVER='Computer Name';

  RUN;

 

 

  *Computer Name from Control Panel\All Control Panel Items\System or

   click start(i.e. Win 7) select Computer and right-click on Properties.

   ( if you are using Windows!).

  

  This works for me on SAS UE (Vmplayer) Win 7 Ultimate.

Ask a Question
Discussion stats
  • 3 replies
  • 367 views
  • 0 likes
  • 3 in conversation