<?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: PROC Import - why is it creating an automatic variable name? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/747998#M234868</link>
    <description>I saw "=ANY" but it seemed as though the restrictions were too tight. But I'll try it.</description>
    <pubDate>Tue, 15 Jun 2021 00:46:29 GMT</pubDate>
    <dc:creator>dbjosiah</dc:creator>
    <dc:date>2021-06-15T00:46:29Z</dc:date>
    <item>
      <title>PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/747991#M234862</link>
      <description>&lt;P&gt;Hi, I'm importing an Excel dataset with 53 variables. PROC Import is renaming 7 of the variables as Varx, with x based on their original column number. For example, two of the Excel column names (quotes added) are "Resource(s) needed?" and "Department (Regarding) (Individual)." I understand that Import renames "Resource(s) needed?" to VAR15 because of the question mark, but why does it rename "Department..." to VAR18? All of the long names are truncated at 32 characters but not necessarily changed and there aren't any other fields that when truncated would be identical. The log says (sample):&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: Variable Name Change. Resource(s) needed? -&amp;gt; VAR18&lt;/P&gt;&lt;P&gt;NOTE: Variable Name Change. Department (Regarding) (Individu -&amp;gt; VAR23&lt;/P&gt;&lt;P&gt;NOTE: Variable Name Change. Reporting Organization (Regardin -&amp;gt; Reporting_Organization__Regardin&lt;/P&gt;&lt;P&gt;The issue is that I need to automate the program for others to use. I can leave instructions to remove question marks and other such ("national characters"?) from Excel before importing, but I can't figure out what's wrong with "Department (Regarding... ." I just rename the variables after import but don't want the others to have to do that, and I can't guarantee that the columns will always be in the same order and thus the "x" suffix may change arbitrarily.&lt;/P&gt;&lt;P&gt;Thanks for any suggestions!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 00:19:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/747991#M234862</guid>
      <dc:creator>dbjosiah</dc:creator>
      <dc:date>2021-06-15T00:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/747995#M234865</link>
      <description>Did you try any system options like validvarname?</description>
      <pubDate>Tue, 15 Jun 2021 00:40:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/747995#M234865</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-06-15T00:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/747998#M234868</link>
      <description>I saw "=ANY" but it seemed as though the restrictions were too tight. But I'll try it.</description>
      <pubDate>Tue, 15 Jun 2021 00:46:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/747998#M234868</guid>
      <dc:creator>dbjosiah</dc:creator>
      <dc:date>2021-06-15T00:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/747999#M234869</link>
      <description>Okay, I’m curious if you find a position because I ran into this before and I also ended up renaming them but I agree with you that it seems very manual.</description>
      <pubDate>Tue, 15 Jun 2021 00:48:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/747999#M234869</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-06-15T00:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748000#M234870</link>
      <description>&lt;P&gt;OK, I just tried that and it kind of worked, but I would have to refer to (e.g.,) "Resource(s) needed?"n each time which is pretty onerous. Just seems like there should be something I'm missing about the ones with no obvious special characters.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 00:52:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748000#M234870</guid>
      <dc:creator>dbjosiah</dc:creator>
      <dc:date>2021-06-15T00:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748001#M234871</link>
      <description>&lt;P&gt;Yeah, that's no good.&amp;nbsp; You can't rely on VARx because x will vary for a given column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OPTIONS VALIDVARNAME=ANY; may fix it for you, but sometimes name literals are a pain to work with; you have to put the column names in quotes followed by an "n", for example:&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Department (Regarding) (Individual) would be 'Department (Regarding) (Individual)'n.&amp;nbsp; Try it.&amp;nbsp; That should be quick and repeatable so long as it doesn't cause some kind of problem downstream.&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;Downstream users would have to also use "ANY"&amp;nbsp;&lt;/STRONG&gt;as the valid var name.&amp;nbsp; Hopefully that's no big deal.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If that becomes a hassle, you could try using the XLSX engine on a Libname and reading the Excel spreadsheet that way.&amp;nbsp; You have to have the "SAS/ACCESS Interface to PC Files" product licensed&amp;nbsp; &amp;nbsp;You can run the below to see if you've got it.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SETININT;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;If you read the Excel file via a Libname, the renaming may be different.&amp;nbsp; It might just do the same re-naming, but I suspect that it may be a little more sophisticated since it's a relatively new product.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use a libname with the XLSX engine, it would be something like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LIBNAME My_Excel  XLSX "&amp;amp;path\My_Excel_Filename.xlsx";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Path is just the path on your system of the Excel file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then in your Data step (or Proc), you would use the sheet name as though it were a SAS dataset name.&amp;nbsp; Usually the default for the first sheet name in Excel is "Sheet1."&amp;nbsp; If we use Sheet1, it would look like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA  sas_copy_of_excel_file;
    SET My_Excel.Sheet1;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Can't hurt to try.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Jim&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 01:13:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748001#M234871</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2021-06-15T01:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748004#M234873</link>
      <description>&lt;P&gt;Please post your PROC IMPORT SAS log including your source code. It's hard to offer advice when we can't see what options you are using.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 01:13:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748004#M234873</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-06-15T01:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748009#M234876</link>
      <description>&lt;P&gt;What type of Excel file are you reading?&amp;nbsp; Modern XLSX format?&amp;nbsp; Older XLS format?&amp;nbsp; Or are you instead not reading an Excel file at all?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general the trick is to read the first row as DATA and use that data to issue the RENAME command to change the names that PROC IMPORT (or XLSX libname engine) generated for the variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile='myfile.xslx' out=want dbms=xlsx;
  getnames=yes;
run;
proc import datafile='myfile.xslx' out=nonames dbms=xlsx;
  getnames=no;
run;
proc transpose data=want(obs=0) out=names;
  var _all_;
proc transpose data=nonames(obs=1) out=rawnames ;
   var _all_;
run;
data names ;
  set names ;
  set rawnames(keep=col1 rename=(col1=rawname));
  length newname $32 ;
  newname=translate(strip(combl(translate(rawname,' ',compress(rawname,'_','kad')))),'_',' ');
run;
proc sql noprint;
  select catx('=',nliteral(_name_),newname) into :renames separated by ' '
  from names
  where upcase(_name_) ne upcase(newname)
  ;
quit;
proc datasets lib=work nolist ;
  modify want ;
    rename &amp;amp;renames;
  run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Jun 2021 01:45:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748009#M234876</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-06-15T01:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748056#M234895</link>
      <description>&lt;P&gt;You want to take control of your import process, which means you need to take the Excel file format out of it.&lt;/P&gt;
&lt;P&gt;Save the spreadsheet to a CSV file, and read that with a DATA step, which allows you to set reasonable and valid variable names, set the variable types and other attributes correctly, and deal with aberrations in the data (e.g. "N/A" in an otherwise numeric column) as necessary.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 07:43:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748056#M234895</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-06-15T07:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748067#M234897</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/377938"&gt;@dbjosiah&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi, I'm importing an Excel dataset with 53 variables. PROC Import is renaming 7 of the variables as Varx, with x based on their original column number. For example, two of the Excel column names (quotes added) are "Resource(s) needed?" and "Department (Regarding) (Individual)." I understand that Import renames "Resource(s) needed?" to VAR15 because of the question mark, but why does it rename "Department..." to VAR18? All of the long names are truncated at 32 characters but not necessarily changed and there aren't any other fields that when truncated would be identical. The log says (sample):&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Variable Name Change. Resource(s) needed? -&amp;gt; VAR18&lt;/P&gt;
&lt;P&gt;NOTE: Variable Name Change. Department (Regarding) (Individu -&amp;gt; VAR23&lt;/P&gt;
&lt;P&gt;NOTE: Variable Name Change. Reporting Organization (Regardin -&amp;gt; Reporting_Organization__Regardin&lt;/P&gt;
&lt;P&gt;The issue is that I need to automate the program for others to use. I can leave instructions to remove question marks and other such ("national characters"?) from Excel before importing, but I can't figure out what's wrong with "Department (Regarding... ." I just rename the variables after import but don't want the others to have to do that, and I can't guarantee that the columns will always be in the same order and thus the "x" suffix may change arbitrarily.&lt;/P&gt;
&lt;P&gt;Thanks for any suggestions!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Proc import "likes" data that has&lt;/P&gt;
&lt;P&gt;1) exactly one row of header values&lt;/P&gt;
&lt;P&gt;2) data that starts in rows immediately after the headers&lt;/P&gt;
&lt;P&gt;3) columns align nicely.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Things that people do in Excel files frequently that make Proc Import behave other than expected:&lt;/P&gt;
&lt;P&gt;1) have headers in more than one row&lt;/P&gt;
&lt;P&gt;2) have headers that span more than one column&lt;/P&gt;
&lt;P&gt;3) have hidden columns&lt;/P&gt;
&lt;P&gt;4) have headers that have mixed vertical cell alignment, some merged, some not&lt;/P&gt;
&lt;P&gt;5) have hidden rows&lt;/P&gt;
&lt;P&gt;6) have data in merged cells&lt;/P&gt;
&lt;P&gt;7) duplicate column headings&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; have column headers that exceed 32 characters and are exactly the same (except possibly for case) for the first 32 characters.&lt;/P&gt;
&lt;P&gt;9) Use characters that do not play well in SAS variable names, i.e. anything other than letter, digit or _ characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any of the first 4 have the possibility of having "Varn" , where N is a column number, variable names created.&lt;/P&gt;
&lt;P&gt;8 appears to be likely in your case. SAS data sets can only have 32 characters for variables names. If the "duplicate" column headers are less than 32 characters SAS will append a column number but when the full text is exactly the same that isn't possible. so it names the column based on the column number: Varn.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have received Excel "data" with as many as 20 column headings of Total in a single file. So Import generates Total, total8 , total15, total18, total21 ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has anyone promised you that the file structure will&lt;STRONG&gt; never ever&lt;/STRONG&gt; change? Then you may be able to use either the LIBNAME EXCEL to bring in data but you will need to write data step code to make things nice and likely parse data if you want to have a chance at "automating" anything because Proc Import will make guesses for every file and depending on the values in the data may have changing types and lengths.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 08:43:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748067#M234897</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-06-15T08:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748157#M234936</link>
      <description>&lt;P&gt;Thanks everyone. I'm guessing from the array of answers that there's no easy fix here. In response to your questions:&lt;/P&gt;&lt;P&gt;1. SASKiwi: Just simple PROC IMPORT code:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dbjosiah_1-1623770127873.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60413i1B920FFE63590FC9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dbjosiah_1-1623770127873.png" alt="dbjosiah_1-1623770127873.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(ps - we visited family in NZ last year; what a wonderful country!)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. jimbarbour: This PROC setinint output doesn't seem to include your option:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dbjosiah_0-1623769841685.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60412i946A9E35808D37E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dbjosiah_0-1623769841685.png" alt="dbjosiah_0-1623769841685.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;3. Tom &amp;amp; Ballardw: I'm using a regular .xlsx file with all the normal conventions listed by Ballardw. I currently do the renames in the next data step. One of the issues is that the file structure *is* likely to change at some unforeseen and unannounced point (out of my control).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. KurtBremser and&amp;nbsp;Irackley: As an addition to my note above about cumbersome literal name changes, your solutions are similar and if no one has a simple fix that's probably what I'll do. The original names shouldn't change, so I can use the validvarname=any option, then rename the renames (e.g.,&amp;nbsp;&lt;SPAN&gt;"Resource(s) needed?"n) in the first data step.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I do wish, though, someone could explain why it can't deal with "Reporting Organization (Regardin"...&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 15:36:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748157#M234936</guid>
      <dc:creator>dbjosiah</dc:creator>
      <dc:date>2021-06-15T15:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748164#M234939</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;&lt;SPAN&gt;I do wish, though, someone could explain why it can't deal with "Reporting Organization (Regardin"...&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Let's try something if you have a moment:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create a copy of your Excel file.&amp;nbsp; We only need a few rows, so it shouldn't take up a lot of space.&lt;/LI&gt;
&lt;LI&gt;Manually remove all special characters from the column title, in particular, the parentheses.&amp;nbsp; You can leave underscores; those are valid in SAS var names.&amp;nbsp; Then, delete each space in the column title and then re add the space with the space bar on your keyboard.&amp;nbsp; This should remove any possible non-display characters that might somehow have gotten in there.&lt;/LI&gt;
&lt;LI&gt;Run a proc import against the manually renamed copy of Excel.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Let's see what the names are after doing the above.&amp;nbsp; I think it might be the parentheses or a non-display character that is causing this behavior.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;This PROC setinint output doesn't seem to include your option:
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dbjosiah_0-1623769841685.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60412i946A9E35808D37E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dbjosiah_0-1623769841685.png" alt="dbjosiah_0-1623769841685.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Actually, I'm looking for the log output that is just after that.&amp;nbsp; It should look something like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jimbarbour_0-1623772339553.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60415i90056CE7C15DFDB1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jimbarbour_0-1623772339553.png" alt="jimbarbour_0-1623772339553.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This will tell you what is installed on your particular system.&amp;nbsp; The sixth one down is the one I'm asking about, "SAS/ACCESS Interface to PC Files."&amp;nbsp; Do you have that on your system?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 16:03:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748164#M234939</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2021-06-15T16:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748165#M234940</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/377938"&gt;@dbjosiah&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks everyone. I'm guessing from the array of answers that there's no easy fix here. In response to your questions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. Tom &amp;amp; Ballardw: I'm using a regular .xlsx file with all the normal conventions listed by Ballardw. I currently do the renames in the next data step. One of the issues is that the file structure *is* likely to change at some unforeseen and unannounced point (out of my control).&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If a file structure is going to change, especially without warning Proc Import is not to be recommended in any way, at least IMHO. I have some such data sources. I use a data step to read a CSV version because then when I specify INFORMATS for variables that don't match the expected values I get invalid data messages and I can then work with the file and data step code to read the new layout.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some of these sources just randomly switch order of columns in the Excel. Sometimes they manage to set variables like Income as Dates, or account identifiers and dates as Currency and sometimes just for some rows of the file.&lt;/P&gt;
&lt;P&gt;EXCEL is a crappy data interchange file format because it places no restrictions on what you can place where and then you have to clean up other's poor decisions.&lt;/P&gt;
&lt;P&gt;One of the advantages of a data step is you get to set the variable names a do not rely on the actual text in the file. Then you can assign labels to them that can use much more text to describe the variables when used by most procedures.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 16:04:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748165#M234940</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-06-15T16:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748170#M234941</link>
      <description>&lt;P&gt;I do not have any trouble reading that name.&amp;nbsp; Here is test program.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename out temp;
data test;
  name='Reporting Organization (Regarding';
  output;
  name='123';
  output;
run;

proc export data=test replace dbms=xlsx file=out;
  putnames=no;
run;

proc import datafile=out dbms=xlsx out=test2 replace;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Please share an example of your XLSX file that is having trouble with the names.&amp;nbsp; You can remove the data lines (or just replace them with a single line of dummy data).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 16:24:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748170#M234941</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-06-15T16:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748197#M234959</link>
      <description>&lt;P&gt;OK, lots of things here. I did miss that part of the output and the “…Interface to PC” line is present. I've attached a dummy file which is a straight save-copy of the original, with 1) special characters removed, 2) hard stops (“spaces”) replaced manually, 3) extraneous columns removed, and 4) some obvious changes to the actual data. In this file, the first 8 columns are the problematic fields, the others read in without problem. Row 7 (red font) has the original variable names, just for your info.&lt;/P&gt;&lt;P&gt;I also looked more closely at the original log, it did say: “NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with options MSGLEVEL=I.” When I did that, there were a bunch of Notes although I don’t know if they’re relevant; they cover both problematic and non-problem variables:&lt;/P&gt;&lt;P&gt;NOTE: VARCHAR data type is not supported by the V9 engine. Variable VAR3 has been converted to CHAR data type.&lt;/P&gt;&lt;P&gt;NOTE: VARCHAR data type is not supported by the V9 engine. Variable Status_Reason has been converted to CHAR data type.&lt;/P&gt;&lt;P&gt;Then I ran the dummy file and didn’t have any problems. So I tried another dummy but not taking the hard stops out (which would be more work for the 2nd crew). And that one also worked but… it accepted the field with a question mark that it had originally renamed to Var53. So I’m really not sure what’s going on there.&lt;/P&gt;&lt;P&gt;Finally, the Excel file I use is a value-paste copy of the original, which does have some hidden code that I don’t know any other way to get rid of (the Community helped me figure that one out!).&lt;/P&gt;&lt;P&gt;It’s looking like the simplest answer is going to be KurtBremser and&amp;nbsp;Irackley’s approach of using validvarname=any and coding in the renames.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 18:43:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748197#M234959</guid>
      <dc:creator>dbjosiah</dc:creator>
      <dc:date>2021-06-15T18:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748198#M234960</link>
      <description>&lt;P&gt;OK, lots of things here. I did miss that part of the output and the “…Interface to PC” line is present. I've attached a dummy file which is a straight save-copy of the original, with 1) special characters removed, 2) hard stops (“spaces”) replaced manually, 3) extraneous columns removed, and 4) some obvious changes to the actual data. In this file, the first 8 columns are the problematic fields, the others read in without problem. Row 7 (red font) has the original variable names, just for your info.&lt;/P&gt;&lt;P&gt;I also looked more closely at the original log, it did say: “NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with options MSGLEVEL=I.” When I did that, there were a bunch of Notes although I don’t know if they’re relevant; they cover both problematic and non-problem variables:&lt;/P&gt;&lt;P&gt;NOTE: VARCHAR data type is not supported by the V9 engine. Variable VAR3 has been converted to CHAR data type.&lt;/P&gt;&lt;P&gt;NOTE: VARCHAR data type is not supported by the V9 engine. Variable Status_Reason has been converted to CHAR data type.&lt;/P&gt;&lt;P&gt;Then I ran the dummy file and didn’t have any problems. So I tried another dummy but not taking the hard stops out (which would be more work for the 2nd crew). And that one also worked but… it accepted the field with a question mark that it had originally renamed to Var53. So I’m really not sure what’s going on there.&lt;/P&gt;&lt;P&gt;Finally, the Excel file I use is a value-paste copy of the original, which does have some hidden code that I don’t know any other way to get rid of (the Community helped me figure that one out!).&lt;/P&gt;&lt;P&gt;It’s looking like the simplest answer is going to be KurtBremser and&amp;nbsp;Irackley’s approach of using validvarname=any and coding in the renames.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 18:44:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748198#M234960</guid>
      <dc:creator>dbjosiah</dc:creator>
      <dc:date>2021-06-15T18:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748207#M234966</link>
      <description>&lt;P&gt;Even with VALIDVARNAME=ANY, the technical limit of 32 for the length of SAS variable names is still there. Save to csv, read with a data step, use sensible variable names, and keep the original Excel column names as labels.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 19:22:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748207#M234966</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-06-15T19:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748211#M234969</link>
      <description>&lt;P&gt;Yes!&amp;nbsp; &lt;EM&gt;Always&amp;nbsp;&lt;/EM&gt;look at the log.&amp;nbsp; Always.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's usually not a problem to have these VARCHAR to CHAR messages.&amp;nbsp; That's normally a very safe conversion which why you don't even get those messages unless you have the message level to I.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's very interesting that the variable names are far more reasonable (if am I understanding what you're saying correctly) if you make a copy but not with the original.&amp;nbsp; That sure sounds like a non-display character in the column name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you have the PC Files access product, you could set up a Libname and see if the XLSX engine is more sophisticated than Proc Import.&amp;nbsp; I imagine it is more sophisticated, but I'm not sure how it will handle this specific instance.&amp;nbsp; Worth a try.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think all it would entail is basically what I've coded below.&amp;nbsp; You'd have to replace the Sheet_Name with the actual sheet name of the sheet inside the Excel file that you are using.&amp;nbsp; You'd also have to change my example path and file names to real ones.&amp;nbsp; This should at least tell you what the column names in SAS will be.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;VALIDVARNAME	=	V7;

%LET	Sheet_Name	=	Sheet1;	**  Default sheet name.  Replace with actual sheet name  **;

LIBNAME	Excel_In	XLSX	'C:\some_folder\Excel_sub_folder\The_Excel_File.xlsx';
LIBNAME	SAS_Out				'C:\some_folder\SAS_sub_folder\';

**------------------------------------------------------------------------------**;

DATA	SAS_Out.&amp;amp;Sheet_Name;
	SET	Excel_In.&amp;amp;Sheet_Name;
RUN;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;
&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 19:35:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748211#M234969</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2021-06-15T19:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748224#M234981</link>
      <description>&lt;P&gt;Ignore the data type messages.&amp;nbsp; That is just PROC IMPORT being stupid.&amp;nbsp; SAS only supports two data types. Fixed length character strings and floating point numbers.&amp;nbsp; So PROC IMPORT is saying that it is internally treating the cells in the XSLX file as variable length strings and is saying it cannot create variable length string variables in a SAS dataset.&amp;nbsp; Why it feels a need to tell you that makes no sense at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not see any issue with your cleaned up first row when reading into SAS dataset.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;4     proc import datafile="&amp;amp;path/&amp;amp;fname" dbms=xlsx out=test1 replace;
5     run;

NOTE:    Variable Name Change.  Full Name Associated Case Indivi -&amp;gt; Full_Name_Associated_Case_Indivi
NOTE:    Variable Name Change.  Address3 State Province Associat -&amp;gt; Address3_State_Province_Associat
NOTE:    Variable Name Change.  Hand-off Outcome Marian -&amp;gt; Hand_off_Outcome_Marian
NOTE:    Variable Name Change.  Resources needed -&amp;gt; Resources_needed
NOTE:    Variable Name Change.  Department Regarding Individual -&amp;gt; Department_Regarding_Individual
NOTE:    Variable Name Change.  Marian ID -&amp;gt; Marian_ID
NOTE:    Variable Name Change.  Individual ID Regarding Individu -&amp;gt; Individual_ID_Regarding_Individu
NOTE:    Variable Name Change.  Part of Household Regarding Indi -&amp;gt; Part_of_Household_Regarding_Indi
NOTE:    Variable Name Change.  Diagnosis Date time Associated C -&amp;gt; Diagnosis_Date_time_Associated_C
NOTE:    Variable Name Change.  Activity Status -&amp;gt; Activity_Status
NOTE:    Variable Name Change.  Status Reason -&amp;gt; Status_Reason
NOTE:    Variable Name Change.  Date Created -&amp;gt; Date_Created
NOTE:    Variable Name Change.  Person is a minor -&amp;gt; Person_is_a_minor
NOTE:    Variable Name Change.  Reached Completed all attempts -&amp;gt; Reached_Completed_all_attempts
NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with
      options MSGLEVEL=I.
NOTE: The import data set has 6 observations and 15 variables.
NOTE: WORK.TEST1 data set was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time):
      real time           0.04 seconds
      cpu time            0.03 seconds
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However your last row, which I take to be the actual column headers from your XLSX file are not handled as well.&lt;/P&gt;
&lt;PRE&gt;13    proc import datafile="&amp;amp;path/&amp;amp;fname" dbms=xlsx out=test2 replace;
14      range='$A7:';
15    run;

NOTE:    Variable Name Change.   Full Name (Associated Case) (In -&amp;gt; VAR1
NOTE:    Variable Name Change.  Address3: State/Province (Associ -&amp;gt; VAR2
NOTE:    Variable Name Change.  Hand-off Outcome (Marian) -&amp;gt; VAR3
NOTE:    Variable Name Change.  Resource(s) needed? -&amp;gt; VAR4
NOTE:    Variable Name Change.  Department (Regarding) (Individu -&amp;gt; VAR5
NOTE:    Variable Name Change.  Marian ID -&amp;gt; Marian_ID
NOTE:    Variable Name Change.  Individual ID (Regarding) (Indiv -&amp;gt; VAR7
NOTE:    Variable Name Change.  Part of Household (Regarding) (I -&amp;gt; VAR8
NOTE:    Variable Name Change.  Diagnosis Date time (Associated -&amp;gt; Diagnosis_Date_time__Associated
NOTE:    Variable Name Change.  Activity Status -&amp;gt; Activity_Status
NOTE:    Variable Name Change.  Status Reason -&amp;gt; Status_Reason
NOTE:    Variable Name Change.  Date Created -&amp;gt; Date_Created
NOTE:    Variable Name Change.  Person is a minor -&amp;gt; Person_is_a_minor
NOTE:    Variable Name Change.  Reached / Completed all attempts -&amp;gt; Reached___Completed_all_attempts
NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with
      options MSGLEVEL=I.
NOTE: The import data set has 0 observations and 15 variables.
NOTE: WORK.TEST2 data set was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time):
      real time           0.02 seconds
      cpu time            0.01 seconds
&lt;/PRE&gt;
&lt;P&gt;There are some patterns here. It does not like the parentheses.&amp;nbsp; It seems to handle the / ok.&amp;nbsp; Not sure about the colon. Or the leading space.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could use VALIDVARNAME=ANY and then it does not seem to transform those names, but then they are really not very usable in code.&lt;/P&gt;
&lt;PRE&gt;Obs    _NAME_                              _LABEL_

  1     Full Name (Associated Case) (In     Full Name (Associated Case) (Individual)
  2    Address3: State/Province (Associ    Address3: State/Province (Associated Case) (Individual)
  3    Hand-off Outcome (Marian)           Hand-off Outcome (Marian)
  4    Resource(s) needed?                 Resource(s) needed?
  5    Department (Regarding) (Individu    Department (Regarding) (Individual)
  6    Marian ID                           Marian ID
  7    Individual ID (Regarding) (Indiv    Individual ID (Regarding) (Individual)
  8    Part of Household (Regarding) (I    Part of Household (Regarding) (Individual)
  9    Diagnosis Date time (Associated     Diagnosis Date time (Associated Case) (Individual)
 10    Activity Status                     Activity Status
 11    Status Reason                       Status Reason
 12    Date Created                        Date Created
 13    Person is a minor                   Person is a minor
 14    Reached / Completed all attempts    Reached / Completed all attempts ?
 15    Birthdate                           Birthdate

&lt;/PRE&gt;
&lt;P&gt;You can read the data without the headers by starting in the first cell of the second row.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile="&amp;amp;path/&amp;amp;fname" dbms=xlsx out=want replace;
  getnames=no;
  range='$A2:';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If want to dynamically read the first row and use those strings as labels for the variables that is the easiest solution.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile="&amp;amp;path/&amp;amp;fname" dbms=xlsx out=names_wide replace;
  getnames=no;
run;
proc transpose data=names_wide(obs=1) out=names ;
  var _all_;
run;
filename code temp;
data _null_;
  set names end=eof;
  if _n_=1 then put 'label';
  put @3 _name_ '=' col1 :$quote. ;
  if eof then put ';' ;
run;
proc datasets lib=work nolist;
  modify want;
%include code / source2;
  run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You could make more compatible names from the strings in the first row than what PROC IMPORT does.&amp;nbsp; For example by converting all of the special characters into underscores.&amp;nbsp; Personally I like to first convert them to space and then use COMPBL() to collapse multiple spaces into a single space.&lt;/P&gt;
&lt;P&gt;So either take the COL1 generated by transposing the first row or the _LABEL_ variable that PROC IMPORT will create when you use VALIDVARNAME=ANY and transform that into a new name for the variable that does not contain any special characters or spaces.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data clean_names;
  set names ;
  length clean_name $32 ;
  clean_name=translate(strip(compbl(translate(col1,' ',compress(col1,compress(col1,'_','kad'))))),'_',' ');
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;Obs    _NAME_    _LABEL_    COL1                                                       clean_name

  1      A          A        Full Name (Associated Case) (Individual)                  Full_Name_Associated_Case_Indivi
  2      B          B       Address3: State/Province (Associated Case) (Individual)    Address3_State_Province_Associat
  3      C          C       Hand-off Outcome (Marian)                                  Hand_off_Outcome_Marian
  4      D          D       Resource(s) needed?                                        Resource_s_needed
  5      E          E       Department (Regarding) (Individual)                        Department_Regarding_Individual
  6      F          F       Marian ID                                                  Marian_ID
  7      G          G       Individual ID (Regarding) (Individual)                     Individual_ID_Regarding_Individu
  8      H          H       Part of Household (Regarding) (Individual)                 Part_of_Household_Regarding_Indi
  9      I          I       Diagnosis Date time (Associated Case) (Individual)         Diagnosis_Date_time_Associated_C
 10      J          J       Activity Status                                            Activity_Status
 11      K          K       Status Reason                                              Status_Reason
 12      L          L       Date Created                                               Date_Created
 13      M          M       Person is a minor                                          Person_is_a_minor
 14      N          N       Reached / Completed all attempts ?                         Reached_Completed_all_attempts
 15      O          O       Birthdate                                                  Birthdate
&lt;/PRE&gt;
&lt;P&gt;But personally if you really just have these 15 variables I would read the data without the names and use RENAME to change the default column names that are both reasonable short and sufficiently meaningful.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;rename 
  A =Full_Name
  B =Address3
  C =Hand_off_Outcome
  D =Resources_needed
  E =Department
  F =Marian_ID
  G =Individual_ID
  H =Part_of_Household
  I =Diagnosis_Datetime
  J =Activity_Status
  K =Status_Reason
  L =Date_Created
  M =Minor
  N =Reached_Completed_all_attempts
  O =Birthdate
;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Jun 2021 20:48:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748224#M234981</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-06-15T20:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Import - why is it creating an automatic variable name?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748371#M235053</link>
      <description>&lt;P&gt;Thanks everyone. I meant to mention before that *I* did not come up with those original variable names... I'll go the csv route and use the validvarname=any option.&lt;/P&gt;
&lt;P&gt;Update: that solution is working just fine, without validvarname. I had to add GUESSINGROWS=MAX, and because the csv import didn't create labels like the xlsx import I found this neat little renaming code:&amp;nbsp;PROC DATASETS; modify dsnname; attrib _all_ label='Original variable'; run; quit;. Then I can add better labels to the ones I care about, which I had to do before anyway. So I'll mark this discussion as Solved.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 21:03:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Import-why-is-it-creating-an-automatic-variable-name/m-p/748371#M235053</guid>
      <dc:creator>dbjosiah</dc:creator>
      <dc:date>2021-06-16T21:03:41Z</dc:date>
    </item>
  </channel>
</rss>

