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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 632 views
  • 0 likes
  • 2 in conversation