BookmarkSubscribeRSS Feed
rara
Calcite | Level 5

Hi There,

 

I have a requirement reading a bunch of XLS files into sas .

And i am using the PCFILES(LIBNAME statement)  method to read it.

But by default , while reading the data it is taking the first row as the header and that is not true all the time in my case.

Also when i set the firstobs= as the start of my data , then sas is giving the default variable naming(i.e. F1,F2...)/

Please help me on the same.

 

Regards,

RR

 

1 REPLY 1
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Yes, this is default behaviour.  Excel is a really bad data source, which is the reason.  For instance, you say you want to start in x row, what if someone else wants to read from col y, or row x, col y, or from a form or a picture.  Its one of the reasons that Excel is a really bad data source and should not be used.  Data should be stored in a logical and structured method.  If your data isn't in that, welcome to the world of wasting your time fixing it.  You will hit other issues as well, mixed type variables, multiple ranges, special characters etc.  Again, Excel is a really bad datasource.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

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