With the dbms=xlsx, it is possible to use range='All_Students$A2:0' to import all the lines from line 2. But it does not work with dbms=excel. Is it meant to be or is it just a bug in SAS 9.4?
libname demo excel "&xxdemo./reporting/class.xlsx";
data demo.'All Students'n;
set sashelp.class;
run;
libname demo clear;
proc import datafile = "&xxdemo./reporting/class.xlsx"
out = demo
dbms = xlsx
replace;
getnames=no;
range='All_Students$A2:0';
run;
It is meant to be this way.
You can point to the desired range when using the libname by using a name starting with $.
You may find these papers interesting De-Mystifying the SAS® LIBNAME Engine in Microsoft Excel: A Practical Guide and How to use SAS to read a range of cells from Excel
I'm alraedy using a $ sign in front of the range.
The link you provided https://blogs.sas.com/content/sasdummy/2018/06/21/read-excel-range/ only use xlsx.
The question is on excel dbms/engine.
Do you have any example with excel?
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.