<?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: Proc import 'xlsx' doesn't work in 'guessingrows' ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-xlsx-doesn-t-work-in-guessingrows/m-p/364570#M86475</link>
    <description>&lt;P&gt;GUESSINGROWS is not a valid option for DBMS=XLSX.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Excel is not a database and doesn't enforce types.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try DBSASTYPE to force a type, but my suggestion would be to create a CSV file and import that.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jun 2017 13:25:11 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-06-06T13:25:11Z</dc:date>
    <item>
      <title>Proc import 'xlsx' doesn't work in 'guessingrows' ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-xlsx-doesn-t-work-in-guessingrows/m-p/364561#M86471</link>
      <description>&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got an error message by use 'guessingrows' in proc import 'xlsx'.&amp;nbsp; I would like to make sure the length of the&amp;nbsp;cell is long engouth to hold&amp;nbsp;the words,&amp;nbsp;&amp;nbsp;how to fix it?&amp;nbsp; Please help.&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;import&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=NC &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;datafile&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'\\abc\monthly_data\Test\Report2017.xlsx'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;dbms&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=xlsx replace;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;sheet&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=variables;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;getnames&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=yes;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;datarow&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;guessingrows&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;159503&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;75 proc import out=NC&lt;/P&gt;&lt;P&gt;76 datafile='\\abc\monthly_data\Test\Report2017.xlsx'&lt;/P&gt;&lt;P&gt;77 dbms=xlsx replace;&lt;/P&gt;&lt;P&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;&lt;P&gt;78 sheet=variables;&lt;/P&gt;&lt;P&gt;79 getnames=yes;&lt;/P&gt;&lt;P&gt;80 datarow=2;&lt;/P&gt;&lt;P&gt;81 guessingrows=159503;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 180&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;&lt;P&gt;82 run;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE IMPORT used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.01 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.03 seconds&lt;/P&gt;&lt;P&gt;83 quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 13:10:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-import-xlsx-doesn-t-work-in-guessingrows/m-p/364561#M86471</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2017-06-06T13:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import 'xlsx' doesn't work in 'guessingrows' ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-xlsx-doesn-t-work-in-guessingrows/m-p/364570#M86475</link>
      <description>&lt;P&gt;GUESSINGROWS is not a valid option for DBMS=XLSX.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Excel is not a database and doesn't enforce types.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try DBSASTYPE to force a type, but my suggestion would be to create a CSV file and import that.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 13:25:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-import-xlsx-doesn-t-work-in-guessingrows/m-p/364570#M86475</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-06-06T13:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import 'xlsx' doesn't work in 'guessingrows' ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-xlsx-doesn-t-work-in-guessingrows/m-p/364571#M86476</link>
      <description>&lt;P&gt;So is there a way to use XLXS cause I have multiple sheets.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 13:26:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-import-xlsx-doesn-t-work-in-guessingrows/m-p/364571#M86476</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2017-06-06T13:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import 'xlsx' doesn't work in 'guessingrows' ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-xlsx-doesn-t-work-in-guessingrows/m-p/364573#M86478</link>
      <description>&lt;P&gt;DBSASTYPE.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 13:27:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-import-xlsx-doesn-t-work-in-guessingrows/m-p/364573#M86478</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-06-06T13:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import 'xlsx' doesn't work in 'guessingrows' ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-xlsx-doesn-t-work-in-guessingrows/m-p/364577#M86480</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I believe the XLSX engine does the guessingrow bit implicitly and always analysis all rows.&lt;/P&gt;
&lt;P&gt;I've just run a test with the first 1 million rows in column A having a value of "a" and row 1000001 having a value of 'bbbbb'. The length of the variable in the SAS table was 5 and no source values got truncated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 13:40:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-import-xlsx-doesn-t-work-in-guessingrows/m-p/364577#M86480</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-06-06T13:40:47Z</dc:date>
    </item>
  </channel>
</rss>

