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).
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.