<?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: I am trying to import data from a xlsx file where first 2 rows are header rows. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-import-data-from-a-xlsx-file-where-first-2-rows/m-p/455992#M115454</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/194430"&gt;@sas_learnsups&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;: I did go through the documentation you attached above but somehow range option didn't work for me.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I saved the copy of file in CSV format and then could import it in SAS dataset.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much. Your documentation is of much help to me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Did't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of a dataset, the actual results and the expected results. Data should be in the form of a data step. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
    <pubDate>Fri, 20 Apr 2018 16:30:25 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-04-20T16:30:25Z</dc:date>
    <item>
      <title>I am trying to import data from a xlsx file where first 2 rows are header rows.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-import-data-from-a-xlsx-file-where-first-2-rows/m-p/455820#M115370</link>
      <description>&lt;P&gt;The&amp;nbsp; file which i am trying to import contains variable names at row 3 and data begins at row 4&lt;/P&gt;&lt;P&gt;following is the code I have done&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT = NEW&lt;BR /&gt;DATAFILE= "\\temp.xlsx"&lt;BR /&gt;DBMS=XLSX REPLACE ;&lt;BR /&gt;NAMEROW=3;&lt;BR /&gt;DATAROW=4;&lt;BR /&gt;GETNAMES=YES;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting error that Namerow is not used properly.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 03:58:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-import-data-from-a-xlsx-file-where-first-2-rows/m-p/455820#M115370</guid>
      <dc:creator>sas_learnsups</dc:creator>
      <dc:date>2018-04-20T03:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to import data from a xlsx file where first 2 rows are header rows.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-import-data-from-a-xlsx-file-where-first-2-rows/m-p/455824#M115373</link>
      <description>&lt;P&gt;It's all in the documentation!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See section "&lt;SPAN&gt;Available Statements for Importing and Exporting Excel Files Using DBMS=XLS and DBMS=XLSX"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;at&amp;nbsp;&lt;A href="http://documentation.sas.com/?docsetId=acpcref&amp;amp;docsetTarget=n0msy4hy1so0ren1acm90iijxn8j.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=acpcref&amp;amp;docsetTarget=n0msy4hy1so0ren1acm90iijxn8j.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;NAMEROW is not available&amp;nbsp;for DBMS=XLSX, use RANGE instead.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 04:06:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-import-data-from-a-xlsx-file-where-first-2-rows/m-p/455824#M115373</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-04-20T04:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to import data from a xlsx file where first 2 rows are header rows.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-import-data-from-a-xlsx-file-where-first-2-rows/m-p/455830#M115379</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;: I did go through the documentation you attached above but somehow range option didn't work for me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I saved the copy of file in CSV format and then could import it in SAS dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much. Your documentation is of much help to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 10:58:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-import-data-from-a-xlsx-file-where-first-2-rows/m-p/455830#M115379</guid>
      <dc:creator>sas_learnsups</dc:creator>
      <dc:date>2018-04-20T10:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to import data from a xlsx file where first 2 rows are header rows.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-import-data-from-a-xlsx-file-where-first-2-rows/m-p/455850#M115387</link>
      <description>&lt;P&gt;Save the XLSX file as CSV.&amp;nbsp; Have a datastep:&lt;/P&gt;
&lt;PRE&gt;data _null_;
  file "abc.csv";
  infile "abc.csv";
  input;
  if _infile_ ne "title1" and _infile_ ne "title2" then put _infile_;
run;&lt;/PRE&gt;
&lt;P&gt;Drops the two title rows assuming they have the text title1/2.&amp;nbsp; You can then write a datastep to read in that csv correctly, per your data specifications documentation.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 08:25:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-import-data-from-a-xlsx-file-where-first-2-rows/m-p/455850#M115387</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-04-20T08:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to import data from a xlsx file where first 2 rows are header rows.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-import-data-from-a-xlsx-file-where-first-2-rows/m-p/455870#M115396</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/194430"&gt;@sas_learnsups&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Thanks anyways&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I believe you've missed that&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt; has given you the full solution and even has taken the time to look-up and post the link to the relevant documentation for you. You need to use RANGE instead of NAMEROW and things will work. ...and the syntax for RANGE is fully documented in the posted link.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want us to fix your code and post something working and tested then you need to provide the sample data to do so.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 10:17:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-import-data-from-a-xlsx-file-where-first-2-rows/m-p/455870#M115396</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-04-20T10:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to import data from a xlsx file where first 2 rows are header rows.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-import-data-from-a-xlsx-file-where-first-2-rows/m-p/455884#M115399</link>
      <description>You need to define a range in your spreadsheet.&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Apr 2018 11:01:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-import-data-from-a-xlsx-file-where-first-2-rows/m-p/455884#M115399</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-04-20T11:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to import data from a xlsx file where first 2 rows are header rows.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-import-data-from-a-xlsx-file-where-first-2-rows/m-p/455891#M115400</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;- I did go through the documentation provided by "ChrisNZ".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will keep in mind to attach a screenshot or sample data, next time I post a quesion in SAS communities.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;sas_learsups&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 11:04:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-import-data-from-a-xlsx-file-where-first-2-rows/m-p/455891#M115400</guid>
      <dc:creator>sas_learnsups</dc:creator>
      <dc:date>2018-04-20T11:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to import data from a xlsx file where first 2 rows are header rows.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-import-data-from-a-xlsx-file-where-first-2-rows/m-p/455992#M115454</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/194430"&gt;@sas_learnsups&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;: I did go through the documentation you attached above but somehow range option didn't work for me.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I saved the copy of file in CSV format and then could import it in SAS dataset.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much. Your documentation is of much help to me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Did't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of a dataset, the actual results and the expected results. Data should be in the form of a data step. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 16:30:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-import-data-from-a-xlsx-file-where-first-2-rows/m-p/455992#M115454</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-20T16:30:25Z</dc:date>
    </item>
  </channel>
</rss>

