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

Error to import Excel file in SAS University Edition no Ubuntu

Reply
Occasional Contributor
Posts: 5

Error to import Excel file in SAS University Edition no Ubuntu

Hi

I'm with problem in import Excel file in SAS University Edition no Ubuntu 14.04. I'm using the code follow;

PROC IMPORT DATAFILE="/home/joseane/Documentos/SasUniversityEdition/myfolders/sasuser.v94/cana.xls"

     OUT=WORK.MYEXCEL

     DBMS=XLS

     REPLACE;

RUN;

/** Print the results. **/

PROC PRINT DATA=WORK.MYEXCEL; RUN;

My data is attached.

The results of log windows show that,

sas2.png

rI esearched, read the similar discussions in this site, but not solve this problem. I'm not understand the error. Can anyone help me?

Thanks,

Maria

SAS Super FREQ
Posts: 8,745

Re: Error to import Excel file in SAS University Edition no Ubuntu

Hi:

  If you are using SAS University Edition, the reason for getting this type of error message usually is that you either 1) did not define your shared folder location correctly or 2) you did define the shared folder location, but you use the WRONG reference for the path or 3) you specify the path name wrong. For example, if I put your cana.xls file in MY shared folder location, in the ALL_EXCEL subfolder, then this is what I see as the location when I right click on the file and choose properties.

For example, here is your XLS file in MY shared folder location:

_1_file_in_shared_folder.png

Then I right click on the folder/file and see the correct path to use (note that it does NOT use my physical file info -- the path starts /folders/myfolders)

_2_location_in_SAS_UE.png

Next I submit the code (same code as yours only with a different path in MY version of UE) and it runs successfully

_3_code_with_correct_location.png

Finally, I see the output.

_4_data_shown_in_WORK_after_import.png

So when you do get the data file in your shared folder location and use the right path name, the IMPORT should work. The key is using the right path.

cynthia

Occasional Contributor
Posts: 5

Re: Error to import Excel file in SAS University Edition no Ubuntu

Thanks,

I did not understand what directory was used to import data.

I believe it is the same problem of some people  to use SAS University Edition.

Now, the code is working ok.

Thanks, you have a great day!

Maria

Ask a Question
Discussion stats
  • 2 replies
  • 447 views
  • 1 like
  • 2 in conversation