Help using Base SAS procedures

How can I import excel data file or cvs file to SAS?

Reply
Occasional Contributor
Posts: 5

How can I import excel data file or cvs file to SAS?

I have created spread sheet in excel and trying to import data file to SAS.

My program version is SAS94 and excel is 34 bit. I found out SAS94 requires excel data convert to cvs.

When I try to import cvs file using import wizard, I get following error message:

Unable to sample external file, no data in first 5 records.

ERROR: Import unsuccessful.  See SAS Log for details.

What is it mean?

I do have some blank spaces in first 5 lines (which is missing values)

How can I import cvs. file into SAS? Please help me Smiley Sad


Super User
Posts: 17,824

Re: How can I import excel data file or cvs file to SAS?

I found out SAS94 requires excel data convert to cvs.

I don't think that's true unless your licensing has changed.

Have you tried Proc Import to import the data, or a data step? You'll need to post either code or a sample file for more help.

Super User
Posts: 6,936

Re: How can I import excel data file or cvs file to SAS?

You need to know the structure of the csv file, then you can write a suiting data step, which does not need any license beyond base at all. Ask for the documentation of the file; if there is none, return to sender.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 9,681

Re: How can I import excel data file or cvs file to SAS?

add an option      datarow=8 .

Ask a Question
Discussion stats
  • 3 replies
  • 271 views
  • 0 likes
  • 4 in conversation