Usage Note 41613: How to add hyperlinks to Microsoft Excel workbooks using the EXPORT procedure
When you use the EXPORT procedure to write to Excel workbooks, web hyperlinks might be displayed as character values. Here is an example:
data temp1;
length mylink $ 50;
input mylink $;
datalines;
www.sas.com
;
proc export data=temp1 outfile='c:\sastest\myhttp.xlsx'
dbms=excel;
sheet='mylinks';
run;
In this example, www.sas.com would be displayed as a character value. To resolve the problem, make sure that HTTP:// or HTTPS:// is added to the web hyperlink you are writing to Excel, as shown in this example:
data temp1;
length mylink $ 50;
input mylink $;
datalines;
http://www.sas.com
;
proc export data=temp1 outfile='c:\sastest\myhttp.xlsx'
dbms=excel;
sheet='mylinks';
run;
To make the hyperlinks active, do the one following after opening the Excel file.
Option 1
- Double-click the hyperlink cell that contains the web address.
- Click any other cell in the worksheet. This activates the hyperlink.
Option 2
- If you have multiple rows to make available, create a new column in Excel with a formula that uses a hyperlink similar to this =HYPERLINK(cell number)
Operating System and Release Information
SAS System | SAS/ACCESS Interface to PC Files | Microsoft Windows XP Professional | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS2M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
When exporting web links to Excel, you must specify http:// or https:// with the weblink data. Otherwise, the string is written as text in Excel.
Date Modified: | 2013-05-23 14:22:13 |
Date Created: | 2010-11-16 13:47:20 |