<?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: How to fix truncated fields in Excel even if the length is set to maximum? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-fix-truncated-fields-in-Excel-even-if-the-length-is-set/m-p/199919#M37355</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, another delightful artifact of working with Excel.&amp;nbsp; As I always suggest, best method is to save as CSV, then write a datastep to read the data in.&amp;nbsp; Excel is not a data transport tool and there a numerous issues with using it.&amp;nbsp; Personally I wasn't that impressed with the libname statement, not because of the tech, but just the interaction between a structured format software and an unstructured file format such as Excel.&amp;nbsp; You wouldn't for instance enter data into Word and then try to read that in would you?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Apr 2015 12:53:21 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2015-04-20T12:53:21Z</dc:date>
    <item>
      <title>How to fix truncated fields in Excel even if the length is set to maximum?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-fix-truncated-fields-in-Excel-even-if-the-length-is-set/m-p/199915#M37351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been trying to import an TEST.XLSX file using below code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/***************************/&lt;/P&gt;&lt;P&gt;libname samp excel "TEST.XLSX" dbMax_text=32767 stringdates=YES scan_timetype=YES;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data work.Data_Step;&lt;/P&gt;&lt;P&gt;set samp."CSR$"n&lt;/P&gt;&lt;P&gt;(dbSasType= (ext_notes='CHAR(32767)') dbmax_text=32767);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;libname samp clear;&lt;/P&gt;&lt;P&gt;/***************************/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Despite setting the maximum lengths, I found that the field ext_notes is still truncated, but the length of the column is maximum. &lt;/P&gt;&lt;P&gt;When I use SAS EG Import Wizard to import the said excel file, the field ext_notes is not truncated. Perhaps there is a hidden special character here which causes the truncation?cia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 11:31:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-fix-truncated-fields-in-Excel-even-if-the-length-is-set/m-p/199915#M37351</guid>
      <dc:creator>angeliquec</dc:creator>
      <dc:date>2015-04-20T11:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix truncated fields in Excel even if the length is set to maximum?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-fix-truncated-fields-in-Excel-even-if-the-length-is-set/m-p/199916#M37352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Whilst Excel can have 32767 characters per cell, I believe SAS is limited to how many characters per column.&amp;nbsp; I would suggest you do a text to columns in Excel and split the data up.&amp;nbsp; Then export to CSV and write a datastep import to ensure you get what you want.&amp;nbsp; &lt;A href="https://support.microsoft.com/en-us/kb/214261/" title="https://support.microsoft.com/en-us/kb/214261/"&gt;https://support.microsoft.com/en-us/kb/214261/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 12:02:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-fix-truncated-fields-in-Excel-even-if-the-length-is-set/m-p/199916#M37352</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-04-20T12:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix truncated fields in Excel even if the length is set to maximum?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-fix-truncated-fields-in-Excel-even-if-the-length-is-set/m-p/199917#M37353</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;&lt;/P&gt;&lt;P&gt;Thank you for the response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS produced one cell of the affected field at just 200 characters as displayed in the table.&lt;/P&gt;&lt;P&gt;However, that cell is actually just 1000 characters. The cell has already been truncated even though it hasn't reached the maximum SAS length.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 12:45:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-fix-truncated-fields-in-Excel-even-if-the-length-is-set/m-p/199917#M37353</guid>
      <dc:creator>angeliquec</dc:creator>
      <dc:date>2015-04-20T12:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix truncated fields in Excel even if the length is set to maximum?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-fix-truncated-fields-in-Excel-even-if-the-length-is-set/m-p/199918#M37354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try scantext= option in proc import .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 12:46:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-fix-truncated-fields-in-Excel-even-if-the-length-is-set/m-p/199918#M37354</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-04-20T12:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix truncated fields in Excel even if the length is set to maximum?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-fix-truncated-fields-in-Excel-even-if-the-length-is-set/m-p/199919#M37355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, another delightful artifact of working with Excel.&amp;nbsp; As I always suggest, best method is to save as CSV, then write a datastep to read the data in.&amp;nbsp; Excel is not a data transport tool and there a numerous issues with using it.&amp;nbsp; Personally I wasn't that impressed with the libname statement, not because of the tech, but just the interaction between a structured format software and an unstructured file format such as Excel.&amp;nbsp; You wouldn't for instance enter data into Word and then try to read that in would you?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 12:53:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-fix-truncated-fields-in-Excel-even-if-the-length-is-set/m-p/199919#M37355</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-04-20T12:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix truncated fields in Excel even if the length is set to maximum?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-fix-truncated-fields-in-Excel-even-if-the-length-is-set/m-p/199920#M37356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't be too optimistic. I've had users who stored their SAS programs as .doc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"There are only two infinite things, the universe and human stupidity. And I'm not so sure about the universe."&lt;/P&gt;&lt;P&gt;Albert Einstein&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 13:09:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-fix-truncated-fields-in-Excel-even-if-the-length-is-set/m-p/199920#M37356</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-04-20T13:09:23Z</dc:date>
    </item>
  </channel>
</rss>

