Dear all,
I am trying to import excel file using libname statement but in my dataset variable name start from second row, actual data from third row and data in first row is of no use. How can I set getname from 2nd row and getdata from 3rd row like proc import.
I am trying to this done using following code:
libname myexcel pcfiles path='\BA1.xlsx'
scantime=yes stringdates=no dbmax_text=2000 ;
data dv;
set myexcel.'DV$'n;
run;
Not Using proc import because format of data is getting change.
The libname XLSX engine gives you access to a whole Excel Workbook and you can't define special options on a sheet level.
I don't understand why you can't use Proc Import. If the source structure changes then that's impacting both the result Proc Import and the XLSX engine will return.
Not sure. Try option DATAROW=3 .
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.