Hi,
I am using a very basic libname xlsx step to read in a set of Excel files:
%let datafile = mypath\myfile.myext
libname xl xlsx "&Datafile.";
%let keeplist = v1 v2 'Variable 3'n 'Variable 4'n;
data mydata;
length v1 $20. v2 $500. 'Variable 3'n 'Variable 4'n $1000. ;
set xl.mysheet (keep=&keeplist.);
run;
libname xl clear;
This reads each file in successfully with no errors in the log. However, I noticed that rows from some Excel file are not being read in. I don't notice any level of missingness on the first row not being read in, so I'm not sure what's going on here.
Any help is much appreciated.
You should provide an example of file that demonstrates that behavior.
Tell us which row(s) are not read.
I realize that your source files may be sensitive. I am not asking for a file containing sensitive information but a file that shows the behavior. That may mean making a copy and replacing sensitive fields with values like XXXXX or 1111 (if the column should be numeric).
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.