BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
BLT2023
Calcite | Level 5

 While working on a project for class, I have written the following code:

 

LIBNAME Check XLSX "&CourseRoot/CDPHE Study/Data/1_Source/Insurance.xlsx";
LIBNAME Check CLEAR;

LIBNAME	CoImpt XLSX "&CourseRoot/CDPHE Study/Data/1_Source/Insurance.xlsx";
PROC PRINT
		DATA = CoImpt.Insurance
		LABEL;
	RUN;
	
	PROC CONTENTS;
	RUN;
 
When I do not include the Proc Contents, it runs fine. When I include the Proc Contents, I get two error messages:
ERROR: Couldn't find range or sheet in spreadsheet
ERROR: File COIMPT.EDUCATION.DATA does not exist.
Below is the log for reference. Where have I gone wrong?
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 68         
 69         LIBNAME Check XLSX "&CourseRoot/CDPHE Study/Data/1_Source/Insurance.xlsx";
 NOTE: Libref CHECK was successfully assigned as follows: 
       Engine:        XLSX 
       Physical Name: /home/u63571562/BIOS6680_2023/CDPHE Study/Data/1_Source/Insurance.xlsx
 70         LIBNAME Check CLEAR;
 NOTE: Libref CHECK has been deassigned.
 71         
 72         LIBNAMECoImpt XLSX "&CourseRoot/CDPHE Study/Data/1_Source/Insurance.xlsx";
 NOTE: Libref COIMPT was successfully assigned as follows: 
       Engine:        XLSX 
       Physical Name: /home/u63571562/BIOS6680_2023/CDPHE Study/Data/1_Source/Insurance.xlsx
 73         PROC PRINT
 74         DATA = CoImpt.Insurance
 75         LABEL;
 76         RUN;
 
 NOTE: Access by observation number not available. Observation numbers will be counted by PROC PRINT.
 NOTE: The import data set has 1 observations and 64 variables.
 NOTE: The import data set has 1 observations and 64 variables.
 NOTE: There were 1 observations read from the data set COIMPT.Insurance.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.06 seconds
       user cpu time       0.05 seconds
       system cpu time     0.01 seconds
       memory              4240.71k
       OS Memory           29028.00k
       Timestamp           09/26/2023 08:29:08 PM
       Step Count                        92  Switch Count  0
       Page Faults                       0
       Page Reclaims                     886
       Page Swaps                        0
       Voluntary Context Switches        9
       Involuntary Context Switches      2
       Block Input Operations            0
       Block Output Operations           24
       
 
 77         
 78         
 78       !  PROC CONTENTS;
 ERROR: Couldn't find range or sheet in spreadsheet
 ERROR: File COIMPT.EDUCATION.DATA does not exist.
 79         RUN;
 
 NOTE: Statements not processed because of errors noted above.
 NOTE: PROCEDURE CONTENTS used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              2875.00k
       OS Memory           29028.00k
       Timestamp           09/26/2023 08:29:08 PM
       Step Count                        93  Switch Count  0
       Page Faults                       0
       Page Reclaims                     662
       Page Swaps                        0
       Voluntary Context Switches        2
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           8
       
 NOTE: The SAS System stopped processing this step because of errors.
 80         
 81         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 91   
1 ACCEPTED SOLUTION

Accepted Solutions
rudfaden
Pyrite | Level 9

The CONTENTS procedure shows the contents of a SAS data set.

 

You have an Excel sheet.

 

Ergo you get an error

 

 

View solution in original post

1 REPLY 1
rudfaden
Pyrite | Level 9

The CONTENTS procedure shows the contents of a SAS data set.

 

You have an Excel sheet.

 

Ergo you get an error

 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 512 views
  • 0 likes
  • 2 in conversation