-1
OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

  PROC IMPORT OUT= Census.taxp_lookupDATAFILE="C:\Users\Dhruv\Desktop\Book1.xlsx"
                     DBMS=xlsx REPLACE;
               SHEET="tax_group";
               GETNAMES=YES;
          RUN;

 ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/C:\Users\Dhruv\Desktop\/Book1.xlsx.

I am facing this error while importing excel file into sas. What do i need to change in my code

Tim Williams
  • 154,628
  • 8
  • 97
  • 125
dhruv kadia
  • 45
  • 1
  • 3
  • 10

1 Answers1

0

you basically need to specify the data to be read: DATAFILE=""

/** Import an XLSX file.  **/

PROC IMPORT DATAFILE="<Your XLSX File>"
        OUT=WORK.MYEXCEL
        DBMS=XLSX
        REPLACE;
RUN;

/** Print the results. **/

PROC PRINT DATA=WORK.MYEXCEL; RUN;

here is how to find the right path for your folder

Video on how to find the excel file and find the right path for SASstudio

PS: to answer the questions: "basically you need to have the file already in My Folders and not path to your local desktop file, also if you are using a server than you need to import, I'm not sure if to SAS University Edition is the option Import on right click folder like in picture listed below: Screen for import is SAS Studio"

Screen for import in SAS Studio

n1tk
  • 2,406
  • 2
  • 21
  • 35