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

I am trying to import data from an excel file with the following format which as some date values missing. can you say how SAS will interpret these missing date values and display them. and is there any other ways to import this file. using university SAS studio.

 

Name Salary Date of joining

Rob 25680 12/02/2012

Steve 35875 5/17/2010

John 26990    

Joe 39995 2/22/2006

 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

There should be a task to import data. If it has XLSX or XLS as a file type to import should be able to import.

 

SAS will set your blank values to missing. This will most likely appear as period when you look at tables. If you get blanks instead then something inhibited SAS from setting the proper date valued numeric variable type. This could happen if the first rows are all missing the value which would make SAS believe the variable is character.

 

If you do not see XLSX as an acceptable file type (meaning your license may not access to Excel) then save the file as CSV from Excel and import that file.

View solution in original post

3 REPLIES 3
HB
Barite | Level 11 HB
Barite | Level 11

With the XLSX file of

Name Salary date_of_joining
Rob 25680 12/2/2012
Steve 35875 5/17/2010
John 26990  
Joe 39995 2/22/2006

 

I get a SAS file of

Name Salary date_of_joining
Rob 25680 2-Dec-12
Steve 35875 17-May-10
John 26990 .
Joe 39995 22-Feb-06
ballardw
Super User

There should be a task to import data. If it has XLSX or XLS as a file type to import should be able to import.

 

SAS will set your blank values to missing. This will most likely appear as period when you look at tables. If you get blanks instead then something inhibited SAS from setting the proper date valued numeric variable type. This could happen if the first rows are all missing the value which would make SAS believe the variable is character.

 

If you do not see XLSX as an acceptable file type (meaning your license may not access to Excel) then save the file as CSV from Excel and import that file.

sridharpolina
Calcite | Level 5

I was wondering how SAS interprets the missing data. Thanks for the clarification.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

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
  • 3 replies
  • 2568 views
  • 0 likes
  • 3 in conversation