When i read the excel by libname, it always have error "ERROR: string is duplicated |><t/>|" in one file, but not in another file, would you please help to guide? thank you very much!
The program is listed as follow:
options validvarname=any;
libname _definea xlsx "&dfadam./datasets/define.xlsx";
data _definea.variables;
set _definea.variables;
run;
options validvarname=v7;
Can you use PROC IMPORT?
proc import out= variables
datafile = "&dfadam./datasets/define.xlsx"
dbms = Excel
replace;
sheet = "variables";
getnames = yes;
run;
This problem has been reported occurring when using proc export, not while using the libname statement. You should verify that all updates regarding access to pc-files are installed and that excel has no problems opening the file. And i am not sure that overwriting a sheet in place works at all.
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.