<?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: Importing Excel file by using datastep in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147619#M262182</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but i have a licence for &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;SAS/ACCESS to PC Files&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please elaborate why this type of different language&amp;nbsp; is coming for character variables and all numeric i'm getting missing values..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 May 2014 19:14:24 GMT</pubDate>
    <dc:creator>shivakrishna</dc:creator>
    <dc:date>2014-05-06T19:14:24Z</dc:date>
    <item>
      <title>Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147617#M262180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please provide me the suggestion for importing the excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while importing the excel file by using datastep, i"m getting error and in the dataset having different launguge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone provide need full help for the same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 18:58:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147617#M262180</guid>
      <dc:creator>shivakrishna</dc:creator>
      <dc:date>2014-05-06T18:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147618#M262181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Licence SAS/ACCESS to PC Files &lt;/P&gt;&lt;P&gt;and you might be able to treat a named range in excel just like a dataset in a datastep&lt;/P&gt;&lt;P&gt;(using LIBNAME access method)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 19:06:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147618#M262181</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2014-05-06T19:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147619#M262182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but i have a licence for &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;SAS/ACCESS to PC Files&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please elaborate why this type of different language&amp;nbsp; is coming for character variables and all numeric i'm getting missing values..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 19:14:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147619#M262182</guid>
      <dc:creator>shivakrishna</dc:creator>
      <dc:date>2014-05-06T19:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147620#M262183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shiva,&lt;/P&gt;&lt;P&gt;I do not have enough information about your problem.&amp;nbsp; I do have code that reads an excel spreadsheet manually though.&amp;nbsp; Your spreadsheet must be open for this code to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/*** clif&amp;nbsp; ***/&lt;BR /&gt;%let sheet=HealthCosts;&lt;BR /&gt;%let strt=2;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* data starts here */&lt;BR /&gt;%let stp=25;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* data ends somewhere before here */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let hospdir=h:\temp\;&lt;BR /&gt;%let wkbk=Robinsondata.xlsx;&lt;/P&gt;&lt;P&gt;options mlogic mprint macrogen symbolgen;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* put in your starting column and ending column */&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;&amp;nbsp; call symput ("opensht",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "'"||'EXCEL|'||"&amp;amp;hospdir"||"[&amp;amp;wkbk.]"||"&amp;amp;sheet."||'!r'||&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;amp;strt"||'c1:r'||"&amp;amp;stp"||'c2'||"'");&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* view the macro resolutions. Make sure they work */&lt;BR /&gt;%put &amp;amp;opensht;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* open the workbooks&amp;nbsp; */&lt;BR /&gt;&amp;nbsp; /* all workbooks and worksheets must exist or this will not work */&lt;/P&gt;&lt;P&gt;filename incodes dde &amp;amp;opensht notab;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* facility sheet */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data home.&amp;amp;sheet.;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; length costsx $16 costs 8 c1 $16 year c2 $4;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile incodes dsd delimiter='09'x noPAD ls=1500 recfm=fb truncover;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input&amp;nbsp;&amp;nbsp; C1 $&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C2 $&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (C1 in: ('&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ')) and (C2 in: ('&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '))&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; then delete;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; costsx = trim(left(c1)); &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; year = trim(left(c2)); &lt;BR /&gt;&amp;nbsp;&amp;nbsp; costs = input(costsx,8.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; drop c1 c2 costsx;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;proc print data=home.&amp;amp;sheet.(obs=20);&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 19:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147620#M262183</guid>
      <dc:creator>jwillis</dc:creator>
      <dc:date>2014-05-06T19:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147621#M262184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shiva,&lt;/P&gt;&lt;P&gt;Proc Import reads the first few cells of a column to determine if a column is all numeric or all character**.&amp;nbsp; If you have mixed values, try to sort your data so that Proc Import will make the whole column character. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**&lt;A href="http://support.sas.com/documentation/cdl/en/proc/66663/HTML/default/viewer.htm#n18jyszn33umngn14czw2qfw7thc.htm"&gt;http://support.sas.com/documentation/cdl/en/proc/66663/HTML/default/viewer.htm#n18jyszn33umngn14czw2qfw7thc.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 19:23:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147621#M262184</guid>
      <dc:creator>jwillis</dc:creator>
      <dc:date>2014-05-06T19:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147622#M262185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the code, but i know in different methods to import the excel files but my question is while importing the excel file by using the data step I'm getting different language for character variables and all numeric variables are missing and also getting error like lost cards. i want to know why this is happening in only datastep.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;data class;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="line-height: 1.5em; font-size: 10pt;"&gt;infile "path/class.xls";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;input name$ sex$ age height weight;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 19:30:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147622#M262185</guid>
      <dc:creator>shivakrishna</dc:creator>
      <dc:date>2014-05-06T19:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147623#M262186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to see examples of what you see and what you want to see.&amp;nbsp; Normally, the problems are with your excel file being in a format/fashion/layout that is different than what SAS 'defaults' expect.&amp;nbsp; Your code appears to me to be relying on the SAS defaults to read your excel file correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 19:33:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147623#M262186</guid>
      <dc:creator>jwillis</dc:creator>
      <dc:date>2014-05-06T19:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147624#M262187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;%include is for code&amp;nbsp; not data of that complexity&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 19:35:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147624#M262187</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2014-05-06T19:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147625#M262188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand. Why are you trying to read an Excel file via a data step?&lt;/P&gt;&lt;P&gt;Data step is for CSV and TXT files generally, not Excel files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of the formatting that Microsoft attaches to the XLS files make it difficult to read via data step. If you need a way that doesn't include proc import you can try some data base options, but it helps to know why. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 19:49:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147625#M262188</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-05-06T19:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147626#M262189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see the below example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; proc export outfile='C:\class.xls' data=sashelp.class;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp; data class1;&lt;/P&gt;&lt;P&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp; infile "C:\class.xls";&lt;/P&gt;&lt;P&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp; input name$ sex$ age height weight;&lt;/P&gt;&lt;P&gt;7&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: The infile "C:\class.xls" is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Filename=C:\class.xls,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RECFM=V,LRECL=256,File Size (bytes)=11776,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Last Modified=07May2014:01:13:55,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create Time=07May2014:01:13:54&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: LOST CARD.&lt;/P&gt;&lt;P&gt;name=ÐÏ à¡± sex=&amp;nbsp; age=. height=. weight=. _ERROR_=1 _N_=1&lt;/P&gt;&lt;P&gt;NOTE: 1 record was read from the infile "C:\class.xls".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The minimum record length was 6.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The maximum record length was 6.&lt;/P&gt;&lt;P&gt;NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.CLASS1 has 0 observations and 5 variables.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&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.29 seconds&lt;/P&gt;&lt;P&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.07 seconds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 19:50:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147626#M262189</guid>
      <dc:creator>shivakrishna</dc:creator>
      <dc:date>2014-05-06T19:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147627#M262190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shiva,&lt;/P&gt;&lt;P&gt;Does this do what you need?&amp;nbsp; The code is untested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data class;&lt;/P&gt;&lt;P&gt;infile "path/class.xls";&lt;/P&gt;&lt;P&gt;format name $50. sex $2. age height weight 8.;&lt;/P&gt;&lt;P&gt;input&amp;nbsp; c1 $ c2 $ c3 $ c4 $ c5$;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*** read all values as character ***/&lt;/P&gt;&lt;P&gt; name&amp;nbsp;&amp;nbsp;&amp;nbsp; = strip(c1);&lt;BR /&gt; sex&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = strip(c2);&lt;BR /&gt; age&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; input(strip(c3),8.);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*** convert character numbers into numeric numbers ***/&lt;BR /&gt; height&amp;nbsp;&amp;nbsp; =&amp;nbsp; input(strip(c4),8.);&lt;BR /&gt; weight&amp;nbsp; =&amp;nbsp; input(strip(c5),8.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 19:50:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147627#M262190</guid>
      <dc:creator>jwillis</dc:creator>
      <dc:date>2014-05-06T19:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147628#M262191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are correct reeza, but why the datastep is not reading the data from excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Possible can you please explain in detail why the datastep is not reading excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 19:56:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147628#M262191</guid>
      <dc:creator>shivakrishna</dc:creator>
      <dc:date>2014-05-06T19:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147629#M262192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because Excel has add a whole bunch of encoding around the variables and SAS doesn't know how to parse through it. &lt;/P&gt;&lt;P&gt;What you're doing is the equivalent of trying to open a .XLS file with a text editor. Try that and see what happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To speak the same language you need a different tool, ie proc import&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 20:02:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147629#M262192</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-05-06T20:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147630#M262193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shiva,&lt;/P&gt;&lt;P&gt;Please consider the solution I've documented in the attached txt file.&amp;nbsp; Many government and private sources sent us Excel files as the documented record of source.&amp;nbsp; I was forced to find a way to read the source EXCEL document as it was delivered.&amp;nbsp; The source documents had odd characters and stray values and other issues so I was forced to read only the cells and columns that contained information.&amp;nbsp; The solution in the attached txt file reads all the cell values as txt then converts the text values to their proper formats. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 12:27:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147630#M262193</guid>
      <dc:creator>jwillis</dc:creator>
      <dc:date>2014-05-07T12:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147631#M262194</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;Whilst your solution is very nice, I wouldn't recommend this approach.&amp;nbsp; There are several reasons for this.&amp;nbsp; Mainly DDE is quite an old technology now, which MS includes only for historical purposes, and SAS supports only for historical purposes.&amp;nbsp; It is no longer updated or advanced and you may find support dropped for it completely in newer versions.&amp;nbsp; There are many methods for importing data from Excel, Save the Excel file as CSV then use that, proc import, or by doing a:&lt;/P&gt;&lt;P&gt;libname mybook xls "....\someexcelfile.xls";&lt;/P&gt;&lt;P&gt;You can then use sas datasteps to read ranges of data direct from the excel file.&amp;nbsp; See:&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://www2.sas.com/proceedings/sugi31/024-31.pdf"&gt;http://www2.sas.com/proceedings/sugi31/024-31.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For further guidance on the libname engine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 12:40:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147631#M262194</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-05-07T12:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147632#M262195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI RW9,&lt;/P&gt;&lt;P&gt;SAS has the agility to do anything.&amp;nbsp; There are as many SAS coding styles as there are people coding SAS.&amp;nbsp; The DDE solution works today and is a solution that will also write to a specific cell in any excel spreadsheet. My coding style was developed to read from and write to specific sheets and cells in "Data Source Record" worksheets.&amp;nbsp; I have encountered all of the items listed in the SUGI proceedings paper link at least once and I am certain that once the DDE solution is no longer viable, the brilliant folks at SAS will be able to create a solution to replace the DDE method**. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS Community is a place where a community can come together to learn.&amp;nbsp; I monitor the community to learn new ideas, methods and solutions.&amp;nbsp; I believe the SAS DDE solution was built to solve the problem "...Excel has...a whole bunch of encoding around the variables and SAS doesn't know how to parse through it...."&amp;nbsp; I also believe that SAS will not let SAS users down.&amp;nbsp; I read your replies and I thank you for those replies.&amp;nbsp; I learn a great deal from all who reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;EM style="font-size: 8pt; font-family: Arial;"&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P align="left"&gt;**"Note that DDE may be used to create, delete, or rename spreadsheets, as well as to format worksheets and enter and delete formulas."&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt; font-family: Arial;"&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 18:13:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147632#M262195</guid>
      <dc:creator>jwillis</dc:creator>
      <dc:date>2014-05-07T18:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147633#M262196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Whilst I am not disagreeing with you, MS has moved to the Open Office XML based format now, hence any application type of coding which can read and write text to a file should be able to do most things in Excel.&amp;nbsp; I can see one area where this is not the case, VBA macros are still held in a proprietary binary file within the XLSX.&amp;nbsp; However saying that, you could build the VBA, compile that, and then copy the file from the old XLSX into your created file before zipping up.&amp;nbsp; Note in this instance I had created all the structure, XML files and definitions manual and packaged them into a zip to create the XLSX rather than using tagsets.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 08:00:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/147633#M262196</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-05-08T08:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Excel file by using datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/273741#M262197</link>
      <description>&lt;P&gt;Try Using something like this :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename soy dde 'Excel|C:\Courses\Independent Study\Data\[SOYREF95.XLS]REF95!R2C2:R229C10';&lt;BR /&gt;data bean;&lt;BR /&gt;infile soy missover;&lt;BR /&gt;input labid $ month reps moisture abn dead abn1 abn2 abn3;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=bean; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link :&amp;nbsp;&lt;A href="http://www.ats.ucla.edu/stat/sas/library/SASRead_os.htm#ReadingExcelFilesIntoSAS" target="_blank"&gt;http://www.ats.ucla.edu/stat/sas/library/SASRead_os.htm#ReadingExcelFilesIntoSAS&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 28 May 2016 03:28:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-Excel-file-by-using-datastep/m-p/273741#M262197</guid>
      <dc:creator>PoojaM</dc:creator>
      <dc:date>2016-05-28T03:28:20Z</dc:date>
    </item>
  </channel>
</rss>

