A common topic - try this: https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-Clickable-external-hyperlink/m-p/494...
my code :
ods excel file='c:\test\hidelink.xlsx';
proc report data=work.project
column request release_id href;
define request / display;
define release_id /display;
define href / computed;
compute href / character length=100;
href = catt('https://staff.contact.com/nav_to.do?uri=request.do?sysparm_query=number=',request);
call define('request','url',href);
endcomp;
run;
ods _all_ close;
the hyperlnk to the request is not displaying. when i click the request number it should go to the above link based on the reques number.
As I understand it, to get a working hyperlink you need to wrap your URL in an Excel formula using the HYPERLINK function like so (example from above link):
compute d1 ;
IF d1='=HYPERLINK("[https://goo.gl/G4a0A9]", "https://www.cms.gov/Medicare/Quality-Initiatives-Patient-Assessment-Instruments/Value-Based-Programs...")' THEN DO;
CALL define(_col_,'style','style=[textdecoration=underline foreground=blue]');
END;
I suggest you get your formula working in Excel first manually then paste it into SAS.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.