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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.