BookmarkSubscribeRSS Feed
SASPhile
Quartz | Level 8
%macro import_top100(dat);
PROC IMPORT OUT= &dat
DATAFILE= "&lkp.\Topprescriber_lkup.xls"
DBMS=EXCEL REPLACE;
SHEET="&dat";
GETNAMES=YES;
MIXED=NO;
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;

RUN;
%mend;
%import_top100(Physician_lookup);

In the above procedure ,do we have an option to let SAS know from which row it should start reading the data?
Say for instance, the first five rows in the excel gives infomation or some notes, and the actual data starts from sixth row, how do we process it?
1 REPLY 1
andreas_lds
Jade | Level 19
It seems that in 9.13 the dbms-type Excel does not support options for defining the first data row. If you know how many rows to read you can use the range options, or switch to dbms=xls and use startrow=.

The online docs contain a full description of all available options for the various dbms-types:
http://support.sas.com/onlinedoc/913/getDoc/en/proc.hlp/a000312413.htm

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
  • 1 reply
  • 615 views
  • 0 likes
  • 2 in conversation