Hello all,
I ran the following code to import an Excel sheet, but PROC CONTENTS
only displays two variables, even though the sheet contains 12 variables. Could you please help me to fix that?
all is fine; there is no error, and I can see all the data with the proc print; the issue is only proc contents that show two variables.
PROC IMPORT
DATAFILE="\\FS12000\USR-SPC\by\Desktop\Bita\Scoresheet.xlsx"
OUT=work.AI_Derm
DBMS=xlsx
replace;
SHEET="AI";
getnames=yes;
RUN;
proc contents data=AI_Derm;
run;
Thanks
What did the log say for each of your two steps? Did you get any errors or warnings or unexpected notes?
Why did you create a dataset named work.AI_Derm and then run PROC CONTENTS on AI_Derm? Normally those mean the same dataset, but they could mean two different datasets if you have USER library assigned.
Are you sure you are looking at the same XLSX file as SAS is reading from?
I am sorry, that is weird; now it works; sorry again, I was in a rush.
Thanks a lot for your answer,
@bhr-q wrote:
I am sorry, that is weird; now it works; sorry again, I was in a rush.
Thanks a lot for your answer,
That's ok. But mark your comment as the "solution", so that folks looking for unsolved topics don't needlessly review this one.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.