<?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 Importing excel with hyperlink column into SAS in All Things Community</title>
    <link>https://communities.sas.com/t5/All-Things-Community/Importing-excel-with-hyperlink-column-into-SAS/m-p/547001#M3778</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to import an excel file which has a column with hyperlink to a text or SQL file in such a way that SAS should read the file in hyperlink along with other excel columns. Can anyone help me with the code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example&amp;nbsp;&lt;/P&gt;&lt;P&gt;Excel file&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;codeid&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;reviewid&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;code&lt;/TD&gt;&lt;TD&gt;objectid&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;32&lt;/TD&gt;&lt;TD&gt;"H:\My Documents\code1.sql"&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;321&lt;/TD&gt;&lt;TD&gt;34&lt;/TD&gt;&lt;TD&gt;"H:\My Documents\code2.sql"&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;234&lt;/TD&gt;&lt;TD&gt;54&lt;/TD&gt;&lt;TD&gt;"H:\My Documents\code3.sql"&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output I would like see&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;codeid&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;reviewid&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;code&lt;/TD&gt;&lt;TD&gt;objectid&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;32&lt;/TD&gt;&lt;TD&gt;Select&lt;BR /&gt;Customerid&lt;BR /&gt;,Name&lt;BR /&gt;From customer.customerdb&lt;BR /&gt;Where name = ‘ab***’&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;321&lt;/TD&gt;&lt;TD&gt;34&lt;/TD&gt;&lt;TD&gt;Select&lt;BR /&gt;Customerid&lt;BR /&gt;,Name&lt;BR /&gt;,b.account&lt;BR /&gt;From customer.customerdb a&lt;BR /&gt;Left join a.account b on a.id= b.id&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;234&lt;/TD&gt;&lt;TD&gt;54&lt;/TD&gt;&lt;TD&gt;Select&lt;BR /&gt;Customerid&lt;BR /&gt;,Name&lt;BR /&gt;,b.account&lt;BR /&gt;,Max(b.sale) sale&lt;BR /&gt;From customer.customerdb a&lt;BR /&gt;Left join a.account b on a.id= b.id&lt;BR /&gt;Group by 1,2,3&lt;BR /&gt;Select&lt;BR /&gt;Customerid&lt;BR /&gt;,Name&lt;BR /&gt;,b.account&lt;BR /&gt;,Max(b.sale) sale&lt;BR /&gt;From customer.customerdb a&lt;BR /&gt;Left join a.account b on a.id= b.id&lt;BR /&gt;Group by 1,2,3&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;</description>
    <pubDate>Thu, 28 Mar 2019 19:25:52 GMT</pubDate>
    <dc:creator>sam-syed</dc:creator>
    <dc:date>2019-03-28T19:25:52Z</dc:date>
    <item>
      <title>Importing excel with hyperlink column into SAS</title>
      <link>https://communities.sas.com/t5/All-Things-Community/Importing-excel-with-hyperlink-column-into-SAS/m-p/547001#M3778</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to import an excel file which has a column with hyperlink to a text or SQL file in such a way that SAS should read the file in hyperlink along with other excel columns. Can anyone help me with the code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example&amp;nbsp;&lt;/P&gt;&lt;P&gt;Excel file&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;codeid&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;reviewid&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;code&lt;/TD&gt;&lt;TD&gt;objectid&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;32&lt;/TD&gt;&lt;TD&gt;"H:\My Documents\code1.sql"&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;321&lt;/TD&gt;&lt;TD&gt;34&lt;/TD&gt;&lt;TD&gt;"H:\My Documents\code2.sql"&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;234&lt;/TD&gt;&lt;TD&gt;54&lt;/TD&gt;&lt;TD&gt;"H:\My Documents\code3.sql"&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output I would like see&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;codeid&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;reviewid&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;code&lt;/TD&gt;&lt;TD&gt;objectid&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;32&lt;/TD&gt;&lt;TD&gt;Select&lt;BR /&gt;Customerid&lt;BR /&gt;,Name&lt;BR /&gt;From customer.customerdb&lt;BR /&gt;Where name = ‘ab***’&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;321&lt;/TD&gt;&lt;TD&gt;34&lt;/TD&gt;&lt;TD&gt;Select&lt;BR /&gt;Customerid&lt;BR /&gt;,Name&lt;BR /&gt;,b.account&lt;BR /&gt;From customer.customerdb a&lt;BR /&gt;Left join a.account b on a.id= b.id&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;234&lt;/TD&gt;&lt;TD&gt;54&lt;/TD&gt;&lt;TD&gt;Select&lt;BR /&gt;Customerid&lt;BR /&gt;,Name&lt;BR /&gt;,b.account&lt;BR /&gt;,Max(b.sale) sale&lt;BR /&gt;From customer.customerdb a&lt;BR /&gt;Left join a.account b on a.id= b.id&lt;BR /&gt;Group by 1,2,3&lt;BR /&gt;Select&lt;BR /&gt;Customerid&lt;BR /&gt;,Name&lt;BR /&gt;,b.account&lt;BR /&gt;,Max(b.sale) sale&lt;BR /&gt;From customer.customerdb a&lt;BR /&gt;Left join a.account b on a.id= b.id&lt;BR /&gt;Group by 1,2,3&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 19:25:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/All-Things-Community/Importing-excel-with-hyperlink-column-into-SAS/m-p/547001#M3778</guid>
      <dc:creator>sam-syed</dc:creator>
      <dc:date>2019-03-28T19:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Importing excel with hyperlink column into SAS</title>
      <link>https://communities.sas.com/t5/All-Things-Community/Importing-excel-with-hyperlink-column-into-SAS/m-p/547041#M3779</link>
      <description>1. Import the Excel file directly via PROC IMPORT&lt;BR /&gt;2. Loop through and import each of the referenced files in that column as pure text and merge it back in.</description>
      <pubDate>Thu, 28 Mar 2019 21:36:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/All-Things-Community/Importing-excel-with-hyperlink-column-into-SAS/m-p/547041#M3779</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-03-28T21:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Importing excel with hyperlink column into SAS</title>
      <link>https://communities.sas.com/t5/All-Things-Community/Importing-excel-with-hyperlink-column-into-SAS/m-p/547208#M3782</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your email.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know how to use proc import but I don't know how to do "&lt;SPAN&gt;Loop through and import each of the referenced files in that column as pure text and merge it back in"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am wondering if you could kindly give me an example of the&amp;nbsp; code to&amp;nbsp;"Loop through and import each of the referenced files in that column as pure text and merge it back in"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 14:28:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/All-Things-Community/Importing-excel-with-hyperlink-column-into-SAS/m-p/547208#M3782</guid>
      <dc:creator>sam-syed</dc:creator>
      <dc:date>2019-03-29T14:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Importing excel with hyperlink column into SAS</title>
      <link>https://communities.sas.com/t5/All-Things-Community/Importing-excel-with-hyperlink-column-into-SAS/m-p/547343#M3783</link>
      <description>First, figure out how to do it for one file - set the delimiter to nothing and a really long string should be bringing it in as a single file.&lt;BR /&gt;&lt;BR /&gt;Second - look at DOSUBL once you have the first step done, that will allow you to call that program for each row.</description>
      <pubDate>Fri, 29 Mar 2019 21:31:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/All-Things-Community/Importing-excel-with-hyperlink-column-into-SAS/m-p/547343#M3783</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-03-29T21:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Importing excel with hyperlink column into SAS</title>
      <link>https://communities.sas.com/t5/All-Things-Community/Importing-excel-with-hyperlink-column-into-SAS/m-p/547418#M3789</link>
      <description>&lt;P&gt;Just read them with a data step. You can use the FILEVAR option on the INFILE statement to make the name of the file to read dynamic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
&amp;nbsp; set have ;
&amp;nbsp; length actual_code $4000 ;
&amp;nbsp; infile code filevar=code end=eof;
&amp;nbsp; do while (not eof);
&amp;nbsp; &amp;nbsp; input;
&amp;nbsp; &amp;nbsp; actual_code=catx(' ',actual_code,_infile_);
&amp;nbsp; end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If the files are too long to stuff into a single variable then output multiple observations per file.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&amp;nbsp; length actual_code $200 ;
&amp;nbsp; infile code filevar=code end=eof truncover;
&amp;nbsp; do row=1 by 1 while (not eof);
&amp;nbsp; &amp;nbsp; input actual_code $char200.;
    output;
&amp;nbsp; end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2019 13:19:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/All-Things-Community/Importing-excel-with-hyperlink-column-into-SAS/m-p/547418#M3789</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-03-30T13:19:09Z</dc:date>
    </item>
  </channel>
</rss>

