BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
desireatem
Pyrite | Level 9

Hi-,

 

We used the code below to import xlsx data but kept having issues. Any help.

 

 

47   proc import datafile = 'C:\Users\s160578\Desktop\NEW_COMBINED.xlsx'

48       out= Baseline

49       dbms = xlsx;

50       sheet = 'Baseline for All';

51       getnames = yes;

52       run;

 

ERROR: Physical file does not exist, C:\Users\s160578\Desktop\NEW_COMBINED.xlsx.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE IMPORT used (Total process time):

      real time           0.16 seconds

      cpu time            0.01 seconds

 

53

54   proc import datafile = 'C:\Users\s160578\Desktop\NEW_COMBINED.xlsx'

55        out= daily

56       dbms = xlsx;

57       sheet = 'Daily';

58       getnames = yes;

59       run;

 

ERROR: Physical file does not exist, C:\Users\s160578\Desktop\NEW_COMBINED.xlsx.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE IMPORT used (Total process time):

      real time           0.00 seconds

      cpu time            0.00 seconds

 

60

 

 

61   proc import datafile = 'C:\Users\s160578\Desktop\NEW_COMBINED.xlsx'

62       out= pupil

63       dbms = xlsx;

64       sheet = 'Pupil';

65       getnames = yes;

66   run;

 

ERROR: Physical file does not exist, C:\Users\s160578\Desktop\NEW_COMBINED.xlsx.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE IMPORT used (Total process time):

      real time           0.00 seconds

      cpu time            0.00 seconds

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
1. Is the file actually there? Find the file, select properties and get the full file path.

2. Are your sheet names correct? Try assigning a libname and then run proc datasets on the libname to get the sheet names.

View solution in original post

2 REPLIES 2
Reeza
Super User
1. Is the file actually there? Find the file, select properties and get the full file path.

2. Are your sheet names correct? Try assigning a libname and then run proc datasets on the libname to get the sheet names.
desireatem
Pyrite | Level 9

You are right. The path was wrong!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 735 views
  • 1 like
  • 2 in conversation