In this SAS How To Tutorial, Kathy Kiraly shows you two ways to import data from Excel to SAS. The first approach uses the LIBNAME statement, and Kathy shares the power of the DATA step and other procedures. The second approach leverages PROC IMPORT in SAS.
To import Excel data to SAS using these approaches, note that you must be running SAS version 9.04.01M2 or higher. Not sure which version you’re on? Kathy shows you how to check. Both methods also require SAS/ACCESS software for integrating SAS and third-party databases.
Chapters
00:00 – LIBNAME statement example
08:42 – PROC IMPORT example
Related Content
◉ Here’s the data set Kathy uses –
◉ SASGF Paper: Integrating SAS and Microsoft Excel –
◉ Learn Base SAS –
◉ Free SAS Programming 1: Essentials course –
◉ Book: Exchanging Data between SAS and Microsoft Excel –
SUBSCRIBE TO THE SAS USERS YOUTUBE CHANNEL #SASUsers #LearnSAS
ABOUT SAS
SAS is a trusted analytics powerhouse for organizations seeking immediate value from their data. A deep bench of analytics solutions and broad industry knowledge keep our customers coming back and feeling confident. With SAS®, you can discover insights from your data and make sense of it all. Identify what’s working and fix what isn’t. Make more intelligent decisions. And drive relevant change.
CONNECT WITH SAS
SAS ►
SAS Customer Support ►
SAS Communities ►
Facebook ►
Twitter ►
LinkedIn ►
Blogs ►
RSS ►…(read more)
Convert Word 2 PDF: Word to PDF Converter
Convert PowerPoint 2 PDF: PPT to PDF Converter
Convert Excel 2 PDF: Excel to PDF Converter
Convert an Image 2 PDF: Image to PDF Converter
Convert HTML 2 PDF: HTML to PDF Converter
More Tools: PDF Converter
How to use “park type “ variable to work in a dataset?
Please teach me,I have 4 sheets in excel,1 is working sheet,some 3 are data sheets,So im copying each data from each sheets and them paste it to working sheet. So now,i wanna use sas by click just 1 button and the result be altogether in 1 sheet and then with final report together.
Kindly let you give me SAS codes for interaction
When I do the first step, the program runs and doesn't show any errors but for some reason it does not actually upload the excel file. Can anyone help? I am using SAS on demand. Thanks!
Excellent tutorial.
OH man my version is V.03.04M0P050819
Great video ,I have enjoyed this SAS video.Thank you ……..
Can someone help me with SAS
How to take path
THIS CODE SAID "THE PHYSICAL FILE DOES NOT EXIST" HERE IS THE CODE;
proc import datafile='H:MPNURSAS.xlsx'
dbms=xlsx
out=work.SASPENS;
sheet=SASPENS;
run;
The excel workbook is in the root directory of H:
Hi excellent and shortest. I got exactly the same information after running the version code. I got X lib successfully and the first part of the proc contents and lib X empty. When I look at your folder, I can see the c: / and know idea how one can see that on your sever folder. Nobody's has C:/. What is my problem?
This is helpful. To clarify, can you specify the location on your computer of your excel file that you were trying to import?
I’m asking because I’m getting stopped at the very early step of proc print.
I have an H drive, but my institute doesn’t provide me access to a C drive.
When I run proc print, I receive a warning: “ERROR: file WORK.cyhy.data does not exist”.
Meanwhile, libname and proc contents worked fine.
This is very nice.Thanks for posting.
I cant see these excel tables(parks, species visits) in the library i created, it shows in the log that its successfully created but when i see on the libraries panel its blank…… please help….
Hi there! I found this video very helpful, but I am coming across an issue and I think I am missing a step. When the demonstrator puts in "x" from that file and all the data is already there, mine does not have the data in there. Is there a step that can be explained on how to get it there or can you direct me to a video that will help? Thank you in advance!
Guys no matter How confident you are on your skills watch this Vedio again before appearing base Certification.
If possible could you help us about use of SAS on demand for academics (SAS ODA) ? We ask to analyze my PHD student data in SAS ODA. We used GLIMMIX in SAS script. Is it possible to use GLIMMIX in SAS ODA. If possible could write how can call data from excel and do analyz via GLIMMIX in SAS ODA. Thank you so much.
what…
It seems this doesn't work for SAS EG (7.1)
Thanks for posting this, I encoutered a quesiton today on excel, sheets.
aprendarei conhecer SAS! sou surdo, meu nomé e Osmar! moro Brasil. prazer em conhecer vc
Pronounce it, S.A.S., not "sas".
Great Video Very Helpful. Actually in sas 9.4 By using LIBNAME XLSX STATEMENT DATASETS ARE PREPARED BUT THESE ARE NOT OPENING. ITS SHOWS SOME ERROR. HOW CAN WE OPEN THESE DATASETS.
essa mulher é ninja de mais heheh