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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 926 views
  • 0 likes
  • 2 in conversation