<?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: changing variable type when reading excel data in Microsoft Integration with SAS</title>
    <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/changing-variable-type-when-reading-excel-data/m-p/2359#M124</link>
    <description>Richard:&lt;BR /&gt;
  It may be time to contact Tech Support with help on this. My importing of spreadsheets is mostly limited to single worksheets....unless somebody else has an idea.&lt;BR /&gt;
cynthia</description>
    <pubDate>Thu, 22 Feb 2007 03:48:36 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2007-02-22T03:48:36Z</dc:date>
    <item>
      <title>changing variable type when reading excel data</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/changing-variable-type-when-reading-excel-data/m-p/2355#M120</link>
      <description>I've assigned a spreadsheet to a libname (libname f "xyz.xls") and am using a data step to read in 2  worksheets.&lt;BR /&gt;
&lt;BR /&gt;
One of the columns starts off and is mostly numeric, but occationally has text in it. SAS brings it in as numeric.&lt;BR /&gt;
&lt;BR /&gt;
I would like to read the column as text. Is there any way to override the default behaviour?&lt;BR /&gt;
&lt;BR /&gt;
Thank You,&lt;BR /&gt;
Richard Wright</description>
      <pubDate>Wed, 21 Feb 2007 21:05:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/changing-variable-type-when-reading-excel-data/m-p/2355#M120</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-02-21T21:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: changing variable type when reading excel data</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/changing-variable-type-when-reading-excel-data/m-p/2356#M121</link>
      <description>Richard...&lt;BR /&gt;
  If you're using the Libname Excel engine, you can specify the MIXED=YES option on the import. This will read the "mixed" type column as character data. There is a side effect that the use of the MIXED= option causes the Excel workbook to be in READONLY mode (according to the doc).&lt;BR /&gt;
  &lt;BR /&gt;
  This option seems designed to do exactly what you want.&lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 21 Feb 2007 21:27:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/changing-variable-type-when-reading-excel-data/m-p/2356#M121</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-02-21T21:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: changing variable type when reading excel data</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/changing-variable-type-when-reading-excel-data/m-p/2357#M122</link>
      <description>Thanks, Cynthia.&lt;BR /&gt;
&lt;BR /&gt;
I tried that and it didn't seem to work.&lt;BR /&gt;
&lt;BR /&gt;
Maybe, I'll go back and try it again.&lt;BR /&gt;
&lt;BR /&gt;
Right now, I've resorted to import with lots of options, but that seems to be doing the same thing. The problem seems to stem from text added after the number - it looks like SAS sees the number, the blank after the number and blows off the remaining text.&lt;BR /&gt;
&lt;BR /&gt;
And I thought this was going to be a snap.</description>
      <pubDate>Wed, 21 Feb 2007 21:58:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/changing-variable-type-when-reading-excel-data/m-p/2357#M122</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-02-21T21:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: changing variable type when reading excel data</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/changing-variable-type-when-reading-excel-data/m-p/2358#M123</link>
      <description>I revisited the MIXED=YES option and here's what I found:&lt;BR /&gt;
&lt;BR /&gt;
I am trying to read two sheets:&lt;BR /&gt;
&lt;BR /&gt;
SET ldrs.'timesheeting$'N(IN=t KEEP=_last_name first_name position__ Approvers_Position__ Approver_s_Name RENAME=(Approvers_Position__= certifiers_position__ Approver_s_Name=name_of_certifier))&lt;BR /&gt;
	    ldrs.'100% ILS-CRS$'N(IN=p KEEP=_last_name first_name position__ certifiers_Position__ Name_of_Certifier);&lt;BR /&gt;
&lt;BR /&gt;
If I run the SET statement as is, I generate an error message about position__ being defined as numeric and character.&lt;BR /&gt;
&lt;BR /&gt;
If I comment out the second data set (100%), things run as (more or less) expected.</description>
      <pubDate>Wed, 21 Feb 2007 22:44:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/changing-variable-type-when-reading-excel-data/m-p/2358#M123</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-02-21T22:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: changing variable type when reading excel data</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/changing-variable-type-when-reading-excel-data/m-p/2359#M124</link>
      <description>Richard:&lt;BR /&gt;
  It may be time to contact Tech Support with help on this. My importing of spreadsheets is mostly limited to single worksheets....unless somebody else has an idea.&lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 22 Feb 2007 03:48:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/changing-variable-type-when-reading-excel-data/m-p/2359#M124</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-02-22T03:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: changing variable type when reading excel data</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/changing-variable-type-when-reading-excel-data/m-p/2360#M125</link>
      <description>I took care of it:&lt;BR /&gt;
renamed the one var to pos1 and pos2 respectively and used a combination of in= processing and ifc(vtype()=) that seems to be doing the trick (although I am puzzled by one facet of this - but that's for another day).&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the help, Cynthia</description>
      <pubDate>Thu, 22 Feb 2007 15:15:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/changing-variable-type-when-reading-excel-data/m-p/2360#M125</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-02-22T15:15:08Z</dc:date>
    </item>
  </channel>
</rss>

