<?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: Import of Excel sheet crashes SAS. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Import-of-Excel-sheet-crashes-SAS/m-p/294413#M61427</link>
    <description>&lt;P&gt;The problem has been solved.&lt;/P&gt;&lt;P&gt;When I saved my sheet as csv, I noticed that 73 fields were imported while there should only be 70. When I checked the csv, I noticed that there were 3 ';' too much. Those fields were empty.&lt;/P&gt;&lt;P&gt;So I went back to the Excel sheet and deleted the 5 following columns (to be sure) and it works!&lt;/P&gt;&lt;P&gt;At this moment I don't understand why this is. The columns seem completely empty but at least I have a workaround.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for all the help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: It might be a good idea to print an error message so the user has a clue what might cause the problem.&lt;/P&gt;</description>
    <pubDate>Fri, 26 Aug 2016 15:00:12 GMT</pubDate>
    <dc:creator>WouterKBC</dc:creator>
    <dc:date>2016-08-26T15:00:12Z</dc:date>
    <item>
      <title>Import of Excel sheet crashes SAS.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-of-Excel-sheet-crashes-SAS/m-p/294388#M61419</link>
      <description>&lt;P&gt;SAS crashes when trying to import a specific Excel sheet.&lt;/P&gt;&lt;P&gt;I never had any problems with importing Excel sheets in SAS until now. I use the exact same method as I always use. I can import other sheets from the same file.&lt;/P&gt;&lt;P&gt;But with this specific sheet, SAS crashes every time. When I try to run it on a remote server, this server disconnects.&lt;/P&gt;&lt;P&gt;The problem is sometimes resolved when removing some columns from the sheet. When I get it to work and slowly reintroduce the other columns, I can run it without any problems. When I run the exact code on an exact copy with the exact same columns and data, it doesn't work anymore, unless I apply the same procedure that I described above again.&lt;/P&gt;&lt;P&gt;This doesn't seem to be a data problem, because it doesn't happen if the fields get reintroduced slowly. I feel like SAS cannot handle too much new fields at once. (I'm talking about 70 fields that will be imported.)&lt;/P&gt;&lt;P&gt;The problem also occurs when there is only 1 position in the Excel sheet.&lt;/P&gt;&lt;P&gt;I've also tried to remove all layout, which doesn't help either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This&amp;nbsp;sheet&amp;nbsp;is an outputfile of another procedure which runs automatically, so I cannot/may not alter this data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code that I use for importing the Excel sheet:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC IMPORT&amp;nbsp;OUT=&amp;amp;datalib..src_&amp;amp;dataset.&lt;BR /&gt;&amp;nbsp;DBMS = xlsx&lt;BR /&gt;&amp;nbsp;datafile = "&amp;amp;inputfile";&lt;BR /&gt;&amp;nbsp;SHEET = "&amp;amp;sheet";&lt;BR /&gt;&amp;nbsp;getnames = yes;&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 13:55:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-of-Excel-sheet-crashes-SAS/m-p/294388#M61419</guid>
      <dc:creator>WouterKBC</dc:creator>
      <dc:date>2016-08-26T13:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Excel sheet crashes SAS.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-of-Excel-sheet-crashes-SAS/m-p/294393#M61420</link>
      <description>&lt;P&gt;Sounds like a SAS tech support question.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 14:03:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-of-Excel-sheet-crashes-SAS/m-p/294393#M61420</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-08-26T14:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Excel sheet crashes SAS.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-of-Excel-sheet-crashes-SAS/m-p/294398#M61421</link>
      <description>&lt;P&gt;Excel has many hidden elements which can affect things. &amp;nbsp;Why can you not save the Excel file to CSV and import that - that would generally be my preferred method anyways. &amp;nbsp;70 columns shouldn't be a problem from a technical standpoint - although programming with that many columns would be a nightmare.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One thing you could try is to highlight the range in Excel and copy-&amp;gt;paste to a new empty sheet, paste only values. &amp;nbsp;If that imports you can tell something is hidden.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you say this sheet is an output of another procedure, what do you mean, is it created from SAS?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 14:10:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-of-Excel-sheet-crashes-SAS/m-p/294398#M61421</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-08-26T14:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Excel sheet crashes SAS.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-of-Excel-sheet-crashes-SAS/m-p/294413#M61427</link>
      <description>&lt;P&gt;The problem has been solved.&lt;/P&gt;&lt;P&gt;When I saved my sheet as csv, I noticed that 73 fields were imported while there should only be 70. When I checked the csv, I noticed that there were 3 ';' too much. Those fields were empty.&lt;/P&gt;&lt;P&gt;So I went back to the Excel sheet and deleted the 5 following columns (to be sure) and it works!&lt;/P&gt;&lt;P&gt;At this moment I don't understand why this is. The columns seem completely empty but at least I have a workaround.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for all the help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: It might be a good idea to print an error message so the user has a clue what might cause the problem.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 15:00:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-of-Excel-sheet-crashes-SAS/m-p/294413#M61427</guid>
      <dc:creator>WouterKBC</dc:creator>
      <dc:date>2016-08-26T15:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Excel sheet crashes SAS.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-of-Excel-sheet-crashes-SAS/m-p/294549#M61453</link>
      <description>&lt;P&gt;Weird! I would just sent this along to Tech Support. SAS isn't acting correctly...it shouldn't crash when this happens.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;They may be interested in finding out more about your environment, to figure out why it's happening.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Sat, 27 Aug 2016 01:08:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-of-Excel-sheet-crashes-SAS/m-p/294549#M61453</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2016-08-27T01:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: Import of Excel sheet crashes SAS.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-of-Excel-sheet-crashes-SAS/m-p/298680#M62847</link>
      <description>&lt;P&gt;The fact that the previous workaround worked was probably coincidence, because it doesn't anymore at the moment &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was completely wrong. It has nothing to do with the amount of lines or the last columns. I have received new files (with a low&amp;nbsp;number of lines)&amp;nbsp;which have the same problem. The solution is very simple: remove all formatting. That's it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For some reason SAS cannot handle the formatting that is being used in the excel sheets...&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 15:15:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-of-Excel-sheet-crashes-SAS/m-p/298680#M62847</guid>
      <dc:creator>WouterKBC</dc:creator>
      <dc:date>2016-09-15T15:15:56Z</dc:date>
    </item>
  </channel>
</rss>

