<?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 with xlsx engine, couldn't get all variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/with-xlsx-engine-couldn-t-get-all-variables/m-p/679496#M205188</link>
    <description>&lt;P&gt;Hi, there&lt;/P&gt;&lt;P&gt;When I use the libref with xlsx engine to access the data, I couldn't get all the variables.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;x "&amp;amp;pout.vardict.xlsx";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Capture.JPG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48674iB2A0D11B075EEB35/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I access the data&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname templib xlsx "&amp;amp;pout.vardict.xlsx";
proc sql;
    select name
    from dictionary.columns 
    where libname="TEMPLIB";
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the variable description was disappeared&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 136px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48675i128014FE17BDD25D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Although I can use other approaches to read the data, I want to know what is wrong.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 26 Aug 2020 14:21:17 GMT</pubDate>
    <dc:creator>su35</dc:creator>
    <dc:date>2020-08-26T14:21:17Z</dc:date>
    <item>
      <title>with xlsx engine, couldn't get all variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/with-xlsx-engine-couldn-t-get-all-variables/m-p/679496#M205188</link>
      <description>&lt;P&gt;Hi, there&lt;/P&gt;&lt;P&gt;When I use the libref with xlsx engine to access the data, I couldn't get all the variables.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;x "&amp;amp;pout.vardict.xlsx";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Capture.JPG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48674iB2A0D11B075EEB35/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I access the data&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname templib xlsx "&amp;amp;pout.vardict.xlsx";
proc sql;
    select name
    from dictionary.columns 
    where libname="TEMPLIB";
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the variable description was disappeared&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 136px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48675i128014FE17BDD25D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Although I can use other approaches to read the data, I want to know what is wrong.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 14:21:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/with-xlsx-engine-couldn-t-get-all-variables/m-p/679496#M205188</guid>
      <dc:creator>su35</dc:creator>
      <dc:date>2020-08-26T14:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: with xlsx engine, couldn't get all variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/with-xlsx-engine-couldn-t-get-all-variables/m-p/679518#M205195</link>
      <description>&lt;P&gt;What is contained in the macro variable &amp;amp;pout, and what is the actual path to the Excel file?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 15:08:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/with-xlsx-engine-couldn-t-get-all-variables/m-p/679518#M205195</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-08-26T15:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: with xlsx engine, couldn't get all variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/with-xlsx-engine-couldn-t-get-all-variables/m-p/679555#M205204</link>
      <description>&lt;P&gt;What is your setting for VALIDVARNAME?&lt;/P&gt;
&lt;P&gt;Does the source file have any merged cells in the column header? Hidden columns?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure how well the dictionary tables work with some of the stuff that appears in Excel. You may need to copy the sheet to an actual SAS data set to get a better idea of the contents.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 16:41:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/with-xlsx-engine-couldn-t-get-all-variables/m-p/679555#M205204</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-08-26T16:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: with xlsx engine, couldn't get all variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/with-xlsx-engine-couldn-t-get-all-variables/m-p/679559#M205205</link>
      <description>&lt;P&gt;What version of SAS are you using ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I find your assertion is incorrect for my installation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This example demonstrates creating a worksheet that has a column named "description", and when read via the XLSX engine the description column is present in the metadata table DICTIONARY.COLUMNS result set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;
  length variable $32 type 8 class $8 length apply id 8 description $200;
  input (variable--description) (&amp;amp;);
datalines;
fubar  1  magic  2  3  4  This is fubar check  
run;

proc export data=have dbms=xlsx replace file='c:\temp\mighty-data.xlsx';
run;

libname checkxl xlsx 'c:\temp\mighty-data.xlsx'; 


ods html file='xlsx-lib-meta.html' style=plateau;
proc sql;
  select * from dictionary.columns
  where libname='CHECKXL'
  ;
ods html close;

proc sql;


libname checkxl;

%sysexec start "auto launch" "c:\temp\mighty-data.xlsx";&lt;/PRE&gt;
&lt;P&gt;Perhaps your&amp;nbsp;description column is&amp;nbsp;&lt;EM&gt;empty&lt;/EM&gt;&amp;nbsp;in a way that prevents the engine from processing it (i.e. consider the speculation that the engine thinks your description column is width 0 and discards it)&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 17:06:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/with-xlsx-engine-couldn-t-get-all-variables/m-p/679559#M205205</guid>
      <dc:creator>RichardDeVen</dc:creator>
      <dc:date>2020-08-26T17:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: with xlsx engine, couldn't get all variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/with-xlsx-engine-couldn-t-get-all-variables/m-p/679573#M205211</link>
      <description>Thanks replies,&lt;BR /&gt;According to ballardw's remending, I save the xlsx file to csv file, and re-save the csv file to xlsx file. Then the problem gone&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Aug 2020 18:30:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/with-xlsx-engine-couldn-t-get-all-variables/m-p/679573#M205211</guid>
      <dc:creator>su35</dc:creator>
      <dc:date>2020-08-26T18:30:10Z</dc:date>
    </item>
  </channel>
</rss>

