To modify the PROC IMPORT code, first open the Import Wizard to import the file again but do not run the code. Instead, click the Edit button to open the generated code in a new editor where you can edit it:
After the code opens in a new editor, use the * symbol to comment-out the GETNAMES=YES option:
Now, run the code and it should import the data set successfully:
So then you can use the data set with the Summary Statistics task:
Did that fix the issue?
Go into that Excel file and clean it up first. Delete the header rows (everything before Row 11) and such so that you have a clean table to be imported into SAS.
Why do you think that the import step created a dataset named WORK.IMPORT?
Is that what is says in the SAS log from when you ran the step?
If it did create WORK.IMPORT then you should be able to use it for the summary task.
BUT if you imported the XLSX data to a WORK dataset and then started a NEW SAS session you will have a new empty WORK directory. In that case you need to re-run the IMPORT step before you can work on the summary step.
Thank you all sooooo much for you help today! I went back and deleted the first 10 rows and re-imported and that seems to have worked. Hopefully I can get through the rest of this assignment without any further complications! You have all been lifesavers for me!
-Vanessa
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.