<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Addind hyperlinks to xlsx file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672110#M201938</link>
    <description>&lt;P&gt;Here's an example using ODS EXCEL:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
    input clickable_link $ url $40.;
    datalines ;
    Google http://google.com
    SAS https://www.sas.com/en_us/home.html
    ;
run ;

ods excel file="/my_path/ods_excel_output.xlsx";
 
proc report data=have nowd;
    columns url clickable_link ;
    compute clickable_link;
        call define(_col_,'url',url );
        call define(_col_,'style','style={textdecoration=underline color=blue}');
    endcomp;
run ;
 
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Using the method found here:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-with-creating-clickable-Excel-formulas-links/td-p/244796" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-with-creating-clickable-Excel-formulas-links/td-p/244796&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or also see this slightly less convenient approach using PROC EXPORT. (It works, but you need to double click on the link's cell to activate the hyperlink first.) &lt;A href="https://support.sas.com/kb/41/613.html" target="_blank" rel="noopener"&gt;&amp;nbsp;https://support.sas.com/kb/41/613.html&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data temp1;
length mylink $ 50;
input mylink $;
datalines;
http://www.sas.com
;

proc export data=temp1 outfile='/my_path/proc_export_output.xlsx'
dbms=xlsx;
sheet='mylinks';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 24 Jul 2020 15:24:15 GMT</pubDate>
    <dc:creator>mklangley</dc:creator>
    <dc:date>2020-07-24T15:24:15Z</dc:date>
    <item>
      <title>Addind hyperlinks to xlsx file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672095#M201927</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my data file I have a variable which contains the hypelinks&amp;nbsp;&lt;A href="https://lalala.com/" target="_blank"&gt;https://xxxx.com/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I would like to export this varaible with proc export and have the ACTIVE hyperlink in my file.&lt;/P&gt;
&lt;P&gt;Is it possible with SAS proc export? I can't find the option that can do that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your help!&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Marie&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 14:04:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672095#M201927</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2020-07-24T14:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Addind hyperlinks to xlsx file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672103#M201933</link>
      <description>&lt;P&gt;Instead of using proc export try this Proc report solution using ods excel posted by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Hyperlink-from-ODS-Excel-to-external/td-p/579186" target="_self"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/Hyperlink-from-ODS-Excel-to-external/td-p/579186&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 14:48:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672103#M201933</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2020-07-24T14:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Addind hyperlinks to xlsx file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672110#M201938</link>
      <description>&lt;P&gt;Here's an example using ODS EXCEL:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
    input clickable_link $ url $40.;
    datalines ;
    Google http://google.com
    SAS https://www.sas.com/en_us/home.html
    ;
run ;

ods excel file="/my_path/ods_excel_output.xlsx";
 
proc report data=have nowd;
    columns url clickable_link ;
    compute clickable_link;
        call define(_col_,'url',url );
        call define(_col_,'style','style={textdecoration=underline color=blue}');
    endcomp;
run ;
 
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Using the method found here:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-with-creating-clickable-Excel-formulas-links/td-p/244796" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-with-creating-clickable-Excel-formulas-links/td-p/244796&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or also see this slightly less convenient approach using PROC EXPORT. (It works, but you need to double click on the link's cell to activate the hyperlink first.) &lt;A href="https://support.sas.com/kb/41/613.html" target="_blank" rel="noopener"&gt;&amp;nbsp;https://support.sas.com/kb/41/613.html&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data temp1;
length mylink $ 50;
input mylink $;
datalines;
http://www.sas.com
;

proc export data=temp1 outfile='/my_path/proc_export_output.xlsx'
dbms=xlsx;
sheet='mylinks';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Jul 2020 15:24:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672110#M201938</guid>
      <dc:creator>mklangley</dc:creator>
      <dc:date>2020-07-24T15:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Addind hyperlinks to xlsx file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672113#M201940</link>
      <description>&lt;P&gt;Why not to use Export. Proc Export is concerned with values of data only. No appearance options, no links, no summaries, no border controls, no row controls. Just data. Since to have a Link associated with a value would in fact mean two "values" in a single "cell" it won't do that.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 15:21:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672113#M201940</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-24T15:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Addind hyperlinks to xlsx file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672152#M201960</link>
      <description>Hello,&lt;BR /&gt;Thank you for youe answer! &lt;BR /&gt;I would like to put a hyperlink from second observation, when I do:&lt;BR /&gt;proc report data=have nowd;&lt;BR /&gt;    columns url clickable_link ;&lt;BR /&gt;    compute clickable_link;&lt;BR /&gt;if _N_^=1 then do;&lt;BR /&gt;        call define(_col_,'url',url );&lt;BR /&gt;        call define(_col_,'style','style={textdecoration=underline color=blue}');&lt;BR /&gt;end;&lt;BR /&gt;    endcomp;&lt;BR /&gt;run ;&lt;BR /&gt;it doesn't work. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;Maybe you know some option?&lt;BR /&gt;&lt;BR /&gt;Thank you very much!</description>
      <pubDate>Fri, 24 Jul 2020 18:37:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672152#M201960</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2020-07-24T18:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Addind hyperlinks to xlsx file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672156#M201963</link>
      <description>&lt;P&gt;If I'm understanding correctly, you want only the second observation from your data to be used? Try using monotonic() in a WHERE clause.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=have nowd;
    columns url clickable_link ;
    compute clickable_link;
        call define(_col_,'url',url );
        call define(_col_,'style','style={textdecoration=underline color=blue}');
    endcomp;
    where monotonic() = 2;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If my understanding is off-track, please include your data, code, and desired output.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 18:50:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672156#M201963</guid>
      <dc:creator>mklangley</dc:creator>
      <dc:date>2020-07-24T18:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Addind hyperlinks to xlsx file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672161#M201965</link>
      <description>Thank you!&lt;BR /&gt;I want from second to the last.&lt;BR /&gt;I don't want to put the hyperlink for the first observation.</description>
      <pubDate>Fri, 24 Jul 2020 18:59:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672161#M201965</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2020-07-24T18:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Addind hyperlinks to xlsx file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672162#M201966</link>
      <description>&lt;P&gt;If you want the first observation omitted entirely, then use:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where monotonic() ge 2;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;If that's not what you want, please post your data and desired output&lt;/U&gt;&lt;/STRONG&gt;. Otherwise I'll just be guessing on what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 19:04:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672162#M201966</guid>
      <dc:creator>mklangley</dc:creator>
      <dc:date>2020-07-24T19:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Addind hyperlinks to xlsx file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672169#M201971</link>
      <description>Thank you!&lt;BR /&gt;That works!</description>
      <pubDate>Fri, 24 Jul 2020 19:29:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672169#M201971</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2020-07-24T19:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Addind hyperlinks to xlsx file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672170#M201972</link>
      <description>Last quick question: do you, maybe, know why my hyperlinks work in Chrome and don't work in Explorer?&lt;BR /&gt;Thank you!</description>
      <pubDate>Fri, 24 Jul 2020 19:33:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addind-hyperlinks-to-xlsx-file/m-p/672170#M201972</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2020-07-24T19:33:11Z</dc:date>
    </item>
  </channel>
</rss>

