BookmarkSubscribeRSS Feed
ROHINISDAS
Obsidian | Level 7

I want o import file from second row but it is throwing out error. Below mentioned is the statement that i have executed.Please find the attachement for error formed.

 

Statement Executed:

 

proc import datafile="C:\Documents\execrise2\Database.xls"

out= work.a

DBMS=EXCEL REPLACE;

SHEET="Gold$";

GETNAMES=NO;

DATAROW=2;

RUN;

 

 

 

 


error1.PNG
6 REPLIES 6
SASKiwi
PROC Star

Your error message refers to the DELIMITER =  option which is not in your posted code. Also DATAROW is not available with DBMS = EXCEL, try DBMS = XLS instead:

 

http://support.sas.com/documentation/cdl/en/acpcref/67382/HTML/default/viewer.htm#n0msy4hy1so0ren1ac...

 

ROHINISDAS
Obsidian | Level 7

Still its not working

 

SASKiwi
PROC Star

Post your SAS log then.

Kurt_Bremser
Super User

Get rid of the crappy Excel file format. Export to something sensible and text-based (CSV!!) from Excel, and read that into SAS.

Excel files only cause problems.

 

Why?

With Excel, you always force SAS to make guesses about column attributes and the size of the data (no of rows and columns) for you.

With a text file and a data step, you control the import process.

 

Run the system, don't let the system run you.

ROHINISDAS
Obsidian | Level 7
i totally accept but now a days i am doing exercises based on these concept so i am eager to know the solution.
ballardw
Super User

Please post the log of the code you ran along with any error messages.

 

If there is not an error the describe exactly how it is not working. Is there no data in the result? Incomplete data? Unexpected data? Provide details of exactly what is unsatisfactory.

 

Note that providing the Excel file may not help as Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software.

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
  • 6 replies
  • 1758 views
  • 0 likes
  • 4 in conversation