Hi Guys,
I have an excel file that has many lines with date < x, or date > x or variable1 > 59 etc. This is all in excel concatenate function.
=CONCATENATE("(a<=6)","hello")
When I read this excel file using xlsx libname engine, I get " (a<=6)hello "
Is there a way around this.
Thanks,
Hi SP_SAS
The htmldecode function works here. It gived an ugly warning, but it does the decoding:
data _null_;
a = " (a<=6)hello ";
b = htmldecode(a);
put b;
run;
114
115 data _null_;
116 a = " (a<=6)hello ";
WARNING: Apparent symbolic reference LT not resolved.
117 b = htmldecode(a); put b;
118 put b;
119 run;
(a<=6)hello
How about this?
%let LT=<;
Do you want the text of the formula or the resolved value?
If the later it may be easier to export the sheet as CSV and read that file.
Resolved Value.
Hi SP_SAS
The htmldecode function works here. It gived an ugly warning, but it does the decoding:
data _null_;
a = " (a<=6)hello ";
b = htmldecode(a);
put b;
run;
114
115 data _null_;
116 a = " (a<=6)hello ";
WARNING: Apparent symbolic reference LT not resolved.
117 b = htmldecode(a); put b;
118 put b;
119 run;
(a<=6)hello
Thanks.. That is a good work around..
The warning comes from the way you created your string.
a = ' (a<=6)hello ';
yields no warning.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: