<?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 import excel which has long text in one cell in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-excel-which-has-long-text-in-one-cell/m-p/452120#M114071</link>
    <description>&lt;P&gt;Thank you for your reply.&amp;nbsp; But it still not working.&amp;nbsp; I tried to convert to csv file, which destroyed the data.&amp;nbsp; It just cut off the multi-lines in one cell.&amp;nbsp; So I need to keep xlsx.&amp;nbsp; Thank you for your help&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;20   PROC IMPORT OUT= WORK.managerx
21               DATAFILE= "e:\Users\mhollifi\Desktop\MaxWell read excel\pull
22   08to08.xlsx"
23               DBMS=xlsx;
24        RANGE="'Sheet1$'";
25        GETNAMES=YES;
26        run;

Couldn't find range in spreadsheet
Requested Input File Is Invalid
ERROR: Import unsuccessful.  See SAS Log for details.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Apr 2018 21:59:01 GMT</pubDate>
    <dc:creator>mhollifi</dc:creator>
    <dc:date>2018-04-06T21:59:01Z</dc:date>
    <item>
      <title>How to import excel which has long text in one cell</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-excel-which-has-long-text-in-one-cell/m-p/452102#M114062</link>
      <description>&lt;P&gt;I read that "A cell can contain no more than 32,767 characters.&amp;nbsp;"&amp;nbsp; But how to read them? &amp;nbsp;I have long texts in cells. But when I read it using proc import, it cuts off in 255 characters.&amp;nbsp;&amp;nbsp;Some of the cells contain&amp;nbsp;about 500 characters.&amp;nbsp; Thank you for your help.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC IMPORT OUT= WORK.managers 
            DATAFILE= "e:\Users\mhollifi\Desktop\MaxWell read excel\pull
08to08.xlsx" 
            DBMS=EXCEL REPLACE;
     RANGE="Request3$"; 
     GETNAMES=YES;
     MIXED=NO;
     SCANTEXT=YES;
     USEDATE=YES;
     SCANTIME=YES;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alphabetic List of Variables and Attributes# Variable Type Len Format Informat Label845&lt;/P&gt;&lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;All_Managers&lt;/TD&gt;&lt;TD&gt;Char&lt;/TD&gt;&lt;TD&gt;255&lt;/TD&gt;&lt;TD&gt;$255.&lt;/TD&gt;&lt;TD&gt;$255.&lt;/TD&gt;&lt;TD&gt;All Managers&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;All_Managers_Role_Description&lt;/TD&gt;&lt;TD&gt;Char&lt;/TD&gt;&lt;TD&gt;255&lt;/TD&gt;&lt;TD&gt;$255.&lt;/TD&gt;&lt;TD&gt;$255.&lt;/TD&gt;&lt;TD&gt;All Managers_Role Description&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 06 Apr 2018 20:41:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-excel-which-has-long-text-in-one-cell/m-p/452102#M114062</guid>
      <dc:creator>mhollifi</dc:creator>
      <dc:date>2018-04-06T20:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to import excel which has long text in one cell</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-excel-which-has-long-text-in-one-cell/m-p/452103#M114063</link>
      <description>&lt;P&gt;Data type and length on variables using proc import are determined by guessing the rows.&amp;nbsp;Use&amp;nbsp;&lt;SPAN class="keyword"&gt;GUESSINGROWS&lt;/SPAN&gt;&lt;SPAN&gt;=n higher number ( your expected count of records). By default it is 20, so it those 20 records it found that length and applied to all the records.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="keyword"&gt;GUESSINGROWS&lt;/SPAN&gt;=n can be applied only to delimited files.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;mentioned change it to XLSX and try or convert your file to CSV and use&amp;nbsp;&lt;SPAN class="keyword"&gt;GUESSINGROWS&lt;/SPAN&gt;=n&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 21:03:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-excel-which-has-long-text-in-one-cell/m-p/452103#M114063</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-04-06T21:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to import excel which has long text in one cell</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-excel-which-has-long-text-in-one-cell/m-p/452105#M114065</link>
      <description>&lt;P&gt;Try a different DBMS, I believe the limitation is actually an Excel limitation in the transfer mechanism but it's been a while since I looked into this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try DBMS=XLSX&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And worse case, can you convert the file to CSV and then import it?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 20:53:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-excel-which-has-long-text-in-one-cell/m-p/452105#M114065</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-06T20:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to import excel which has long text in one cell</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-excel-which-has-long-text-in-one-cell/m-p/452118#M114069</link>
      <description>&lt;P&gt;it doesn't work.&amp;nbsp; When I click "import files" on the left it gives me only&amp;nbsp;'dbms =excel replace.' &amp;nbsp;But when I change this to xlsx I got totally error message...&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1    PROC IMPORT OUT= WORK.managerx
2                DATAFILE= "e:\Users\mhollifi\Desktop\MaxWell read excel\pull
3    08to08.xlsx"
4                DBMS=xlsx;
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
5         RANGE="'Request 3$'";
NOTE: The previous statement has been deleted.
6         GETNAMES=YES;
NOTE: The previous statement has been deleted.
7         MIXED=NO;
          -----
          180
8         SCANTEXT=YES;
          --------
          180
9         USEDATE=YES;
          -------
          180
10        SCANTIME=YES;
          --------
          180
11        TEXTSIZE=2024;
          --------
          180
ERROR 180-322: Statement is not valid or it is used out of proper order.

12   RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 21:44:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-excel-which-has-long-text-in-one-cell/m-p/452118#M114069</guid>
      <dc:creator>mhollifi</dc:creator>
      <dc:date>2018-04-06T21:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to import excel which has long text in one cell</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-excel-which-has-long-text-in-one-cell/m-p/452119#M114070</link>
      <description>&lt;P&gt;Some options doesn't support when DBMS=XLSX, try deleting SCANTEXT,..etc&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 21:49:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-excel-which-has-long-text-in-one-cell/m-p/452119#M114070</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-04-06T21:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to import excel which has long text in one cell</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-excel-which-has-long-text-in-one-cell/m-p/452120#M114071</link>
      <description>&lt;P&gt;Thank you for your reply.&amp;nbsp; But it still not working.&amp;nbsp; I tried to convert to csv file, which destroyed the data.&amp;nbsp; It just cut off the multi-lines in one cell.&amp;nbsp; So I need to keep xlsx.&amp;nbsp; Thank you for your help&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;20   PROC IMPORT OUT= WORK.managerx
21               DATAFILE= "e:\Users\mhollifi\Desktop\MaxWell read excel\pull
22   08to08.xlsx"
23               DBMS=xlsx;
24        RANGE="'Sheet1$'";
25        GETNAMES=YES;
26        run;

Couldn't find range in spreadsheet
Requested Input File Is Invalid
ERROR: Import unsuccessful.  See SAS Log for details.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 21:59:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-excel-which-has-long-text-in-one-cell/m-p/452120#M114071</guid>
      <dc:creator>mhollifi</dc:creator>
      <dc:date>2018-04-06T21:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to import excel which has long text in one cell</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-excel-which-has-long-text-in-one-cell/m-p/452121#M114072</link>
      <description>&lt;P&gt;If you want the first sheet then just don't specify anything.&lt;/P&gt;
&lt;P&gt;Also try just use the XLSX libname engine.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname in xlsx "e:\Users\mhollifi\Desktop\MaxWell read excel\pull08to08.xlsx";
proc copy inlib=in outlib=work;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Apr 2018 21:58:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-excel-which-has-long-text-in-one-cell/m-p/452121#M114072</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-04-06T21:58:59Z</dc:date>
    </item>
  </channel>
</rss>

