<?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: Execel importe problem in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34542#M8441</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, after re-reading your post, I presume that the data are simply exactly as shown in the spreadsheet.&amp;nbsp; If so, I stick with my original suggestion, but it takes a couple of steps.&amp;nbsp; Try something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT= WORK.SME&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAFILE= "E:\project\file.xls"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=EXCEL REPLACE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RANGE="SME$";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GETNAMES=NO;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MIXED=NO;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTEXT=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USEDATE=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTIME=YES;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc transpose data=sme out=want (drop=_:);&lt;/P&gt;&lt;P&gt;&amp;nbsp; var f2-f5;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select 'col'||put(monotonic(),1.)||'='||F1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; into : renames separated by " "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from sme&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set want (rename=(&amp;amp;renames.));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that will correct your problem.&lt;/P&gt;&lt;P&gt;Art&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jul 2011 21:51:19 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2011-07-20T21:51:19Z</dc:date>
    <item>
      <title>Execel importe problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34539#M8438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have problem to import data from Excel to SAS dataset. When the Excel file has the observation is (as below) in row, I just use the usual import wizard, then done with the sas code. &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 320px; border-collapse: collapse;"&gt;&lt;TBODY&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl64" height="20" style="width: 48pt; height: 15pt;" width="64"&gt;ProjNum&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; width: 48pt;" width="64"&gt;Claim&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; width: 48pt;" width="64"&gt;Adv&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; width: 48pt;" width="64"&gt;Rare&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; width: 48pt;" width="64"&gt;LastClaim&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl65" height="20" style="height: 15pt; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt;4&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl65" height="20" style="height: 15pt; border-top: medium none;"&gt;2&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt;19&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;0.72&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl65" height="20" style="height: 15pt; border-top: medium none;"&gt;3&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt;12&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;0.3721&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl65" height="20" style="height: 15pt; border-top: medium none;"&gt;4&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt;9&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;0.054&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;PROC IMPORT OUT= WORK.SME &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAFILE= "E:\project\file.xls"&lt;/P&gt;&lt;P&gt;DBMS=EXCEL REPLACE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RANGE="SME$"; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GETNAMES=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MIXED=NO;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTEXT=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USEDATE=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTIME=YES;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have the observation is (as below)&lt;SPAN style="color: #ff0000;"&gt; in column&lt;/SPAN&gt;, the import wizard will import it but in wrong variables, what should i do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 240pt; border-collapse: collapse;" width="320"&gt;&lt;TBODY&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl66" height="20" style="width: 48pt; height: 15pt;" width="64"&gt;ProjNum&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; width: 48pt;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; width: 48pt;" width="64"&gt;2&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; width: 48pt;" width="64"&gt;3&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; width: 48pt;" width="64"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl66" height="20" style="height: 15pt; border-top: medium none;"&gt;ClaimNum&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt;4&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt;19&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt;12&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; border-top: medium none;"&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl66" height="20" style="height: 15pt; border-top: medium none;"&gt;PreAdv&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl66" height="20" style="height: 15pt; border-top: medium none;"&gt;PreAdjR&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt;0.72&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt;0.3721&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt;0.054&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl66" height="20" style="height: 15pt; border-top: medium none;"&gt;LasClaim&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 20:08:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34539#M8438</guid>
      <dc:creator>telescopic</dc:creator>
      <dc:date>2011-07-20T20:08:58Z</dc:date>
    </item>
    <item>
      <title>Execel importe problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34540#M8439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could always transpose it, but I'd be interested in seeing where the problem originates.&amp;nbsp; Can you attach a copy of the spreadsheet to your post?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 20:12:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34540#M8439</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-07-20T20:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Execel importe problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34541#M8440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this below code.I got the output without any errors,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT= SME &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAFILE= "E:\project\file.xls" &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=EXCEL REPLACE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GETNAMES=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MIXED=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USEDATE=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTIME=YES;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 20:31:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34541#M8440</guid>
      <dc:creator>raveena</dc:creator>
      <dc:date>2011-07-20T20:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Execel importe problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34542#M8441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, after re-reading your post, I presume that the data are simply exactly as shown in the spreadsheet.&amp;nbsp; If so, I stick with my original suggestion, but it takes a couple of steps.&amp;nbsp; Try something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT= WORK.SME&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAFILE= "E:\project\file.xls"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=EXCEL REPLACE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RANGE="SME$";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GETNAMES=NO;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MIXED=NO;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTEXT=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USEDATE=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTIME=YES;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc transpose data=sme out=want (drop=_:);&lt;/P&gt;&lt;P&gt;&amp;nbsp; var f2-f5;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select 'col'||put(monotonic(),1.)||'='||F1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; into : renames separated by " "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from sme&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set want (rename=(&amp;amp;renames.));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that will correct your problem.&lt;/P&gt;&lt;P&gt;Art&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 21:51:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34542#M8441</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-07-20T21:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Execel importe problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34543#M8442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If its a one-off the transpose in excel via Paste Special&amp;gt;Transpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If its occurring with multiple datasets then use DDE to read in the file. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 22:16:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34543#M8442</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2011-07-20T22:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: Execel importe problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34544#M8443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just make sure to use the GETNAMES=NO setting on PROC IMPORT.&lt;/P&gt;&lt;P&gt;Then use PROC TRANSPOSE in SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc transpose data=have out=want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; id f1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var f2 - f5 ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 14:58:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34544#M8443</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-07-21T14:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Execel importe problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34545#M8444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom's suggestion accomplishes the same thing that my suggested code does, but I definitely recommend using his!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 15:03:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34545#M8444</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-07-21T15:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Execel importe problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34546#M8445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First, thanks for your (and others) replies.&lt;/P&gt;&lt;P&gt;One piece I don't undstand from your code. I am new to Proc sql. There, I see you are creating:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;col1=ProjNum&lt;/P&gt;&lt;P&gt;col2=ClaimNum&lt;/P&gt;&lt;P&gt;col3=PreAdv&lt;/P&gt;&lt;P&gt;col4=PreAdjR&lt;/P&gt;&lt;P&gt;col5=LasClaim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you store them in the Macro variable 'renames'. (right?)&lt;/P&gt;&lt;P&gt;What does the part of ' separated by " "&amp;nbsp; ' do?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select 'col'||put(monotonic(),1.)||'='||F1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; into : renames separated by " "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;from sme&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set want (rename=(&lt;SPAN style="color: #339966;"&gt;&amp;amp;renames.&lt;/SPAN&gt;)); &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; /*not sure what is it doing here. Create in Sasdata set a new variable 'rename' taking values from Macro variable '&amp;amp;renames.'&amp;nbsp; */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;/*why there is a dot following '&amp;amp;renames' */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;I got the error message when I try your code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;330&amp;nbsp; proc sql ;&lt;BR /&gt;331&amp;nbsp; select 'col'||put(monotonic(),1.)||'='||F1&lt;BR /&gt;332&amp;nbsp; into : renames separated by " "&lt;BR /&gt;333&amp;nbsp; from npo1&lt;BR /&gt;334&amp;nbsp; ;&lt;BR /&gt;335&amp;nbsp; quit;&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;336&amp;nbsp; data want;&lt;BR /&gt;337&amp;nbsp;&amp;nbsp; set want (rename=(&amp;amp;renames.));&lt;BR /&gt;ERROR: Variable col1 is not on file WORK.WANT.&lt;BR /&gt;ERROR: Variable col2 is not on file WORK.WANT.&lt;BR /&gt;ERROR: Variable col3 is not on file WORK.WANT.&lt;BR /&gt;ERROR: Variable col4 is not on file WORK.WANT.&lt;BR /&gt;ERROR: Variable col5 is not on file WORK.WANT.&lt;BR /&gt;ERROR: Variable col6 is not on file WORK.WANT.&lt;BR /&gt;ERROR: Variable col7 is not on file WORK.WANT.&lt;BR /&gt;ERROR: Variable col8 is not on file WORK.WANT.&lt;BR /&gt;ERROR: Variable col9 is not on file WORK.WANT.&lt;BR /&gt;ERROR: Invalid DROP, KEEP, or RENAME option on file WORK.WANT.&lt;BR /&gt;338&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.WANT may be incomplete.&amp;nbsp; When this step was stopped there were 0&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; observations and 0 variables.&lt;BR /&gt;WARNING: Data set WORK.WANT was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 16:23:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34546#M8445</guid>
      <dc:creator>telescopic</dc:creator>
      <dc:date>2011-07-21T16:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Execel importe problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34547#M8446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I indicated in a later post, Tom's suggested transpose code using the ID statement, accomplishes the same thing and much more directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyhow, to answer your question, the separated by " " simply puts spaces between all of the information. If you don't included the separated by space (i.e., " ") statement you would end up with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;col1=ProjNumcol2=ClaimNumcol3=PreAdvcol4=PreAdjRcol5=LasClaim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which SAS wouldn't know what to do with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the error you got, it looks like you either didn't run the proc transpose as I had suggested, or included something else in the call that changed the variable names.&amp;nbsp; Otherwise, proc transpose would have created new variables labeled by column numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, Tom's suggested code obviates the need to run anything other than the procs import and transpose.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 16:37:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34547#M8446</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-07-21T16:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Execel importe problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34548#M8447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And you can drop the name and label variables that gets created:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;PROC&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;IMPORT&lt;/STRONG&gt; &lt;SPAN style="background-color: white; font-family: Consolas; color: blue; font-size: 9pt;"&gt;OUT&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;= WORK.test &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: Consolas; color: blue; font-size: 9pt;"&gt;DATAFILE&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: purple; font-size: 9pt;"&gt;"XXXXXXXXXXXXX.xls"&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: Consolas; color: blue; font-size: 9pt;"&gt;DBMS&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;=EXCEL &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: blue; font-size: 9pt;"&gt;REPLACE&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SHEET=&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: purple; font-size: 9pt;"&gt;"XXXXXXX"&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GETNAMES=NO;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MIXED=NO;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTEXT=YES;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USEDATE=YES;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTIME=YES;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;RUN&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;transpose&lt;/STRONG&gt; &lt;SPAN style="background-color: white; font-family: Consolas; color: blue; font-size: 9pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;=test &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: blue; font-size: 9pt;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;=desired(drop=_name_ _label_);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: Consolas; color: blue; font-size: 9pt;"&gt;id&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt; f1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background-color: white; font-family: Consolas;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: Consolas; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 16:56:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Execel-importe-problem/m-p/34548#M8447</guid>
      <dc:creator>DLing</dc:creator>
      <dc:date>2011-07-21T16:56:50Z</dc:date>
    </item>
  </channel>
</rss>

