<?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: ODS Tagsets.ExcelXP and placing hypelinks to other tabs within same file in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Tagsets-ExcelXP-and-placing-hypelinks-to-other-tabs-within/m-p/72274#M8254</link>
    <description>Hi:&lt;BR /&gt;
  In general, the way to set hyperlinks with ODS is through the use of:     &lt;BR /&gt;
  1) URL= style attribute  &lt;BR /&gt;
  2) with PROC REPORT, using the CALL DEFINE statement with the URL option  &lt;BR /&gt;
  3) for ODS HTML, only, coding the proper &amp;lt;A&amp;gt; tag &lt;BR /&gt;
                                                                                           &lt;BR /&gt;
  TAGATTR is limited to setting formats, formulas and types, when you use the ExcelXP tagset. I have used the URL= style attribute with TAGSETS.EXCELXP without any issues. You do need to know what your sheets will be named in order to be able to build the format that you need. &lt;BR /&gt;
                                                                          &lt;BR /&gt;
  For example, I have my first sheet called, Main; a second sheet called Asia and a third sheet called Canada. I set those using the sheet_name option in TAGSETS.EXCELXP suboption list (as shown below).&lt;BR /&gt;
                                  &lt;BR /&gt;
  Now that I know the names of my sheets, I can make a user defined format that will give Excel the proper "link" syntax it wants. Excel doesn't really want a fully qualified hyperlink, this seems to be the form of link that it uses:&lt;BR /&gt;
[pre]&lt;BR /&gt;
#SheetName!A1&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                                                                                          &lt;BR /&gt;
Next, I built a user-defined format like this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc format ;&lt;BR /&gt;
  value $reglnk 'Asia'= '#Asia!A1'&lt;BR /&gt;
                'Canada' = '#Canada!A1';&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                                                                 &lt;BR /&gt;
Finally, I used the user-defined format here:&lt;BR /&gt;
[pre]&lt;BR /&gt;
    define region / group &lt;BR /&gt;
           style(column)={url=$reglnk.};&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                                   &lt;BR /&gt;
I show a PROC REPORT example, but you could use similar syntax with PROC TABULATE or PROC PRINT or even with a custom Table Template. The full program is below.&lt;BR /&gt;
                                                     &lt;BR /&gt;
cynthia&lt;BR /&gt;
   &lt;BR /&gt;
[pre]&lt;BR /&gt;
proc format ;&lt;BR /&gt;
  value $reglnk 'Asia'= '#Asia!A1'&lt;BR /&gt;
                'Canada' = '#Canada!A1';&lt;BR /&gt;
run;&lt;BR /&gt;
                              &lt;BR /&gt;
ods tagsets.excelxp file='c:\temp\try_hyper.xml' style=sasweb&lt;BR /&gt;
    options(sheet_name='Main');&lt;BR /&gt;
                &lt;BR /&gt;
  proc report data=sashelp.shoes nowd  ;&lt;BR /&gt;
    column region product sales;&lt;BR /&gt;
    where region in ('Asia', 'Canada');&lt;BR /&gt;
    define region / group &lt;BR /&gt;
           style(column)={url=$reglnk.};&lt;BR /&gt;
    define product / group;&lt;BR /&gt;
    define sales / sum;&lt;BR /&gt;
    rbreak after / summarize;&lt;BR /&gt;
  run;&lt;BR /&gt;
                         &lt;BR /&gt;
ods tagsets.excelxp options(sheet_name='Asia') ;&lt;BR /&gt;
                               &lt;BR /&gt;
  proc report data=sashelp.shoes nowd  ;&lt;BR /&gt;
    column region product sales;&lt;BR /&gt;
    where region = 'Asia';&lt;BR /&gt;
    define region / display;&lt;BR /&gt;
    define product / display;&lt;BR /&gt;
    define sales / sum;&lt;BR /&gt;
    rbreak after / summarize;&lt;BR /&gt;
  run;&lt;BR /&gt;
                      &lt;BR /&gt;
ods tagsets.excelxp options(sheet_name='Canada');&lt;BR /&gt;
                            &lt;BR /&gt;
  proc report data=sashelp.shoes nowd  ;&lt;BR /&gt;
    column region product sales;&lt;BR /&gt;
    where region = 'Canada';&lt;BR /&gt;
    define region / display;&lt;BR /&gt;
    define product / display;&lt;BR /&gt;
    define sales / sum;&lt;BR /&gt;
    rbreak after / summarize;&lt;BR /&gt;
  run;&lt;BR /&gt;
                         &lt;BR /&gt;
ods tagsets.excelxp close;&lt;BR /&gt;
[/pre]</description>
    <pubDate>Tue, 03 Feb 2009 23:46:16 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2009-02-03T23:46:16Z</dc:date>
    <item>
      <title>ODS Tagsets.ExcelXP and placing hypelinks to other tabs within same file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Tagsets-ExcelXP-and-placing-hypelinks-to-other-tabs-within/m-p/72273#M8253</link>
      <description>I've thoroughly confused myself, and I am sure there will be a simple answer.  I've created a summary report where I want to have 'hyperlinks' for certain cell counts to drilldown sheets within the same file.  So, if this was a simple 1x1 table with a single count reported, there would be two sheets - one for the summary 1x1 tables and another for the drilldown of corresponding data contributing to that count.&lt;BR /&gt;
&lt;BR /&gt;
I'm having trouble creating the link using the ExcelXP tagset.  should I be using HREF?  is there a tagattr for internal file destinations?&lt;BR /&gt;
&lt;BR /&gt;
I foresee a palm to the forehead gesture when I get the answer &lt;span class="lia-unicode-emoji" title=":winking_face_with_tongue:"&gt;😜&lt;/span&gt;</description>
      <pubDate>Tue, 03 Feb 2009 21:28:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Tagsets-ExcelXP-and-placing-hypelinks-to-other-tabs-within/m-p/72273#M8253</guid>
      <dc:creator>RobW</dc:creator>
      <dc:date>2009-02-03T21:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Tagsets.ExcelXP and placing hypelinks to other tabs within same file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Tagsets-ExcelXP-and-placing-hypelinks-to-other-tabs-within/m-p/72274#M8254</link>
      <description>Hi:&lt;BR /&gt;
  In general, the way to set hyperlinks with ODS is through the use of:     &lt;BR /&gt;
  1) URL= style attribute  &lt;BR /&gt;
  2) with PROC REPORT, using the CALL DEFINE statement with the URL option  &lt;BR /&gt;
  3) for ODS HTML, only, coding the proper &amp;lt;A&amp;gt; tag &lt;BR /&gt;
                                                                                           &lt;BR /&gt;
  TAGATTR is limited to setting formats, formulas and types, when you use the ExcelXP tagset. I have used the URL= style attribute with TAGSETS.EXCELXP without any issues. You do need to know what your sheets will be named in order to be able to build the format that you need. &lt;BR /&gt;
                                                                          &lt;BR /&gt;
  For example, I have my first sheet called, Main; a second sheet called Asia and a third sheet called Canada. I set those using the sheet_name option in TAGSETS.EXCELXP suboption list (as shown below).&lt;BR /&gt;
                                  &lt;BR /&gt;
  Now that I know the names of my sheets, I can make a user defined format that will give Excel the proper "link" syntax it wants. Excel doesn't really want a fully qualified hyperlink, this seems to be the form of link that it uses:&lt;BR /&gt;
[pre]&lt;BR /&gt;
#SheetName!A1&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                                                                                          &lt;BR /&gt;
Next, I built a user-defined format like this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc format ;&lt;BR /&gt;
  value $reglnk 'Asia'= '#Asia!A1'&lt;BR /&gt;
                'Canada' = '#Canada!A1';&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                                                                 &lt;BR /&gt;
Finally, I used the user-defined format here:&lt;BR /&gt;
[pre]&lt;BR /&gt;
    define region / group &lt;BR /&gt;
           style(column)={url=$reglnk.};&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                                   &lt;BR /&gt;
I show a PROC REPORT example, but you could use similar syntax with PROC TABULATE or PROC PRINT or even with a custom Table Template. The full program is below.&lt;BR /&gt;
                                                     &lt;BR /&gt;
cynthia&lt;BR /&gt;
   &lt;BR /&gt;
[pre]&lt;BR /&gt;
proc format ;&lt;BR /&gt;
  value $reglnk 'Asia'= '#Asia!A1'&lt;BR /&gt;
                'Canada' = '#Canada!A1';&lt;BR /&gt;
run;&lt;BR /&gt;
                              &lt;BR /&gt;
ods tagsets.excelxp file='c:\temp\try_hyper.xml' style=sasweb&lt;BR /&gt;
    options(sheet_name='Main');&lt;BR /&gt;
                &lt;BR /&gt;
  proc report data=sashelp.shoes nowd  ;&lt;BR /&gt;
    column region product sales;&lt;BR /&gt;
    where region in ('Asia', 'Canada');&lt;BR /&gt;
    define region / group &lt;BR /&gt;
           style(column)={url=$reglnk.};&lt;BR /&gt;
    define product / group;&lt;BR /&gt;
    define sales / sum;&lt;BR /&gt;
    rbreak after / summarize;&lt;BR /&gt;
  run;&lt;BR /&gt;
                         &lt;BR /&gt;
ods tagsets.excelxp options(sheet_name='Asia') ;&lt;BR /&gt;
                               &lt;BR /&gt;
  proc report data=sashelp.shoes nowd  ;&lt;BR /&gt;
    column region product sales;&lt;BR /&gt;
    where region = 'Asia';&lt;BR /&gt;
    define region / display;&lt;BR /&gt;
    define product / display;&lt;BR /&gt;
    define sales / sum;&lt;BR /&gt;
    rbreak after / summarize;&lt;BR /&gt;
  run;&lt;BR /&gt;
                      &lt;BR /&gt;
ods tagsets.excelxp options(sheet_name='Canada');&lt;BR /&gt;
                            &lt;BR /&gt;
  proc report data=sashelp.shoes nowd  ;&lt;BR /&gt;
    column region product sales;&lt;BR /&gt;
    where region = 'Canada';&lt;BR /&gt;
    define region / display;&lt;BR /&gt;
    define product / display;&lt;BR /&gt;
    define sales / sum;&lt;BR /&gt;
    rbreak after / summarize;&lt;BR /&gt;
  run;&lt;BR /&gt;
                         &lt;BR /&gt;
ods tagsets.excelxp close;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Tue, 03 Feb 2009 23:46:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Tagsets-ExcelXP-and-placing-hypelinks-to-other-tabs-within/m-p/72274#M8254</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-02-03T23:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Tagsets.ExcelXP and placing hypelinks to other tabs within same file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Tagsets-ExcelXP-and-placing-hypelinks-to-other-tabs-within/m-p/970095#M26891</link>
      <description>&lt;P&gt;I have used this option in the past and it was working for me. Recently I am using a new instance of SAS in a new company and its not working. Is there anything to do with SAS options.? I am using SAS 9.4 M7 PC SAS.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2025 11:09:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Tagsets-ExcelXP-and-placing-hypelinks-to-other-tabs-within/m-p/970095#M26891</guid>
      <dc:creator>anandbillava</dc:creator>
      <dc:date>2025-07-02T11:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Tagsets.ExcelXP and placing hypelinks to other tabs within same file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Tagsets-ExcelXP-and-placing-hypelinks-to-other-tabs-within/m-p/970100#M26892</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16856"&gt;@anandbillava&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have used this option in the past and it was working for me. Recently I am using a new instance of SAS in a new company and its not working. Is there anything to do with SAS options.? I am using SAS 9.4 M7 PC SAS.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Provide a &lt;STRONG&gt;minimal&lt;/STRONG&gt; reproducible example program that others can run.&lt;/P&gt;
&lt;P&gt;That is provide a data step that creates enough data and the code to create an XML file where the hyperlinks do not work for you.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2025 11:59:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Tagsets-ExcelXP-and-placing-hypelinks-to-other-tabs-within/m-p/970100#M26892</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-07-02T11:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Tagsets.ExcelXP and placing hypelinks to other tabs within same file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Tagsets-ExcelXP-and-placing-hypelinks-to-other-tabs-within/m-p/970108#M26893</link>
      <description>&lt;P&gt;Is the issue that the hyperlinks are not working or is the file not opening in Excel?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2025 13:21:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Tagsets-ExcelXP-and-placing-hypelinks-to-other-tabs-within/m-p/970108#M26893</guid>
      <dc:creator>Chevell_sas</dc:creator>
      <dc:date>2025-07-02T13:21:35Z</dc:date>
    </item>
  </channel>
</rss>

