Hello SAS-users.
I use the code below to import a specific range from XLS sheet.
The first row of the range becomes the variables names.
I want the automatic variables names (similarly option GETNAMES=NO in PROC IMPORT).
Is it possible with OLEDB?
libname boo oledb
init_string="provider=Microsoft.ACE.OLEDB.12.0;
data source=\\xxxxx.xxxx.xxx.xx\UOLib\test\SNB0_monthly_mar12.xls;
extended properties=Excel 8.0";
data new; set boo.'M-7$A6:H3000'n; run;
libname boo clear;
Regards,
Oleg.
I found the solution.
HDR=Yes or HDR=No. See code below.
libname myxls oledb ACCESS=READONLY provider="Microsoft.ACE.OLEDB.12.0"
properties=("data source"="&fullname" "Mode"="Read")
provider_string="Excel 8.0;ReadOnly=True;HDR=no;IMEX=1;"
;
Regards,
Oleg.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.