Hi
I have one situation. I have one dataset, in this dataset one column is there containing all links like
When I am getting the output in excel or HTML from at from SAS code, I am getting the data in that particular column as normal data, but I need that data in Hyperlink format.
Can you help me how can I get that. What ods format I can use to get that. I need that code in PROC REPORT actually. To print the data I am using PROC REPORT.
Situation is little bit urgent, expecting quick help.
Regards
Sourav
I have used this code
ods html file="/var/opt/data/data_project/sas94/bire/redwh/data/tmp/temp.html" ;
PROC REPORT DATA=FINAL_REPORT;
COLUMN DATA_DICT_LINK;
DEFINE DATA_DICT_LINK / DISPLAY "Wiki Link" ;
compute DATA_DICT_LINK ;
href=trim(DATA_DICT_LINK)||".html";
call define(_col_, "URL", href);
endcomp;
run;
I have tried with URLP and URB also but not getting the link in proper way, which been mentioned in side the column. I mean to say exact link is not opening. When clicking on that hyperlink from excel output.
Regars
Sourav
ods html close;
It looks like you're missing the appropriate tags in your data set variable - this works for me, for example
data test;
link = "<a href='https://www.sas.com/en_us/home.html'>SAS</a>";
run;
ods html body="/folders/myshortcuts/Dropbox/test.html";
proc print data=test;
run;
ods html close;
Thank
I am using proc report there in my project. Anything you can suggest there. For that column. To get all the link from that column as hyperlink.
Regards
Sourav
also in that column I have many links. How can I hyperlink that.
Regards
Sourav
I have used this code
ods html file="/var/opt/data/data_project/sas94/bire/redwh/data/tmp/temp.html" ;
PROC REPORT DATA=FINAL_REPORT;
COLUMN DATA_DICT_LINK;
DEFINE DATA_DICT_LINK / DISPLAY "Wiki Link" ;
compute DATA_DICT_LINK ;
href=trim(DATA_DICT_LINK)||".html";
call define(_col_, "URL", href);
endcomp;
run;
I have tried with URLP and URB also but not getting the link in proper way, which been mentioned in side the column. I mean to say exact link is not opening. When clicking on that hyperlink from excel output.
Regars
Sourav
ods html close;
At last it worked for me. I have just removed
||".html";
this part from the code, because my link was tiny link. For tiny link it was not working. For other link it will work.
Thanks
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.