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

Help with Importing .xlsx and .sav files into SAS Studio

Reply
N/A
Posts: 1

Help with Importing .xlsx and .sav files into SAS Studio

I am having trouble importing my data from excel (.xlsx) and spss (.sav) files into SAS Studio.

I am using the following code:

proc import out=spsslinked_data

  datafile="/folders/MyFolders/data/spsssavedfile.sav"

  dbms=sav REPLACE;

run;

I have also tried changing sav to spss

and for the excel file:

proc import out=excellinked_data

  datafile="/folders/MyFolders/data/excelsavedfile.sav"

  dbms=xlsx REPLACE;

run;

I get the following error message:

ERROR: Physical file does not exist, /folders/MyFolders/Data/spsssavedfile.sav.

I have also tried:

proc import out=spsslinked_data

  datafile="C:\Data\spsssavedfile.sav"

  dbms=sav REPLACE;

run;

I get the following error message:

ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/


I would be very appreciative if someone could provide me the basic step by step code from the very beginning on how to import data .xlsx and .sav folders from a folder on the desktop of the server into SAS studio.


SAS Super FREQ
Posts: 8,866

Re: Help with Importing .xlsx and .sav files into SAS Studio

HI:

  Please look at this previous forum posting, with screen shots of how to import .XLS and .XLSX files from Excel into SAS when using SAS University Edition and SAS Studio: https://communities.sas.com/message/218581#218581 . I am not sure whether .SAV files are possible to import the same way. The challenge is that the DBMS= option are specific to the file type. So it would be inappropriate to use DBMS=XLS, or DBMS=EXCEL for an SPSS .SAV file. You might want to open a track with Tech Support about the .SAV files.

  The previous posting should help you with the Excel import.

cynthia

Ask a Question
Discussion stats
  • 1 reply
  • 1541 views
  • 0 likes
  • 2 in conversation