Discussion:
Variable name contains an illegal character
(too old to reply)
m***@gmail.com
2009-01-29 22:07:27 UTC
Permalink
Hi All,

I'm using SPSS 17, and I'm having problems pasting variable names from
a list (column) in excel to the variable name column in SPSS. I keep
getting the following error message: "Variable name contains an
illegal character". But there are no illegal characters involved!
Further, it will not give me this error message if I try to paste only
a small number of variable names (e.g., 2 names).

This is something that I have routinely used in the past with v. 15
with no problems. Indeed, if I use the same excel file with the same
names, it will paste perfectly with version 15, but will not with
version 17.

Also, this problem doesn't seem to be consistent. Sometimes it will
work ok, others not.

Any thoughts? I'm losing my mind here.

Thanks!

Mary
Bruce Weaver
2009-01-29 23:11:30 UTC
Permalink
Post by m***@gmail.com
Hi All,
I'm using SPSS 17, and I'm having problems pasting variable names from
a list (column) in excel to the variable name column in SPSS.
What is the "variable name column" in SPSS? Do you mean in the
Variable View tab of the Data Editor?
Post by m***@gmail.com
I keep
getting the following error message: "Variable name contains an
illegal character". But there are no illegal characters involved!
But apparently there are.
Post by m***@gmail.com
Further, it will not give me this error message if I try to paste only
a small number of variable names (e.g., 2 names).
This is something that I have routinely used in the past with v. 15
with no problems. Indeed, if I use the same excel file with the same
names, it will paste perfectly with version 15, but will not with
version 17.
Also, this problem doesn't seem to be consistent. Sometimes it will
work ok, others not.
Any thoughts? I'm losing my mind here.
Thanks!
Mary
Perhaps if you explain why you're pasting variable names into SPSS,
someone can suggest an alternative way of accomplishing your goal. If
the point is to rename the variables in an existing file, for example,
you could do that with a RENAME VARIABLES command:

RENAME VARIABLES (list of current names = list of new names).

The list of current names can be pasted via the "Variables" tool (the
button has an icon of a data table with a red question mark beside
it), and the new names can be pasted from Excel.

--
Bruce Weaver
***@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."
m***@gmail.com
2009-01-29 23:28:43 UTC
Permalink
Hello Bruce,

Thanks. But I'm afraid that I have just learned from SPSS in a phone
conversation that the problem is the following: "It's a bug."

I like to create variable names in excel because it's efficient. For
example, let's say I have an 18-item scale that assesses need for
cognition. I might like to name these variables nfc1, nfc2,...nfc18.
In excel I can create these names immediately by staring with the
first two names, nfc1 and nfc2, and then dragging down the column.

Likewise, sometimes I collect data online. It's very efficient to copy
the names of the form items in html into excel, then I can quickly
paste them into SPSS.

Let me reiterate, though, this this happens *and there are no illegal
characters* in the variable names. I can further demonstrate this
because I can open a file in SPSS that already has the variables in
place. If I were to want to copy some of the variable names from that
file into a new SPSS file, I get the same error message.

SPSS told me that "they are aware" of the problem and will try to
address it in the next patch.

For the life of me, I don't know why I let go of v. 15. I should have
learned my lesson after seeing v. 16.

Best,

Mary
Post by m***@gmail.com
Hi All,
I'm using SPSS 17, and I'm having problems pasting variable names from
a list (column) in excel to the variable name column in SPSS.
What is the "variable name column" in SPSS?  Do you mean in the
Variable View tab of the Data Editor?
Post by m***@gmail.com
I keep
getting the following error message: "Variable name contains an
illegal character". But there are no illegal characters involved!
But apparently there are.
Post by m***@gmail.com
Further, it will not give me this error message if I try to paste only
a small number of variable names (e.g., 2 names).
This is something that I have routinely used in the past with v. 15
with no problems. Indeed, if I use the same excel file with the same
names, it will paste perfectly with version 15, but will not with
version 17.
Also, this problem doesn't seem to be consistent. Sometimes it will
work ok, others not.
Any thoughts? I'm losing my mind here.
Thanks!
Mary
Perhaps if you explain why you're pasting variable names into SPSS,
someone can suggest an alternative way of accomplishing your goal. If
the point is to rename the variables in an existing file, for example,
RENAME VARIABLES (list of current names = list of new names).
The list of current names can be pasted via the "Variables" tool (the
button has an icon of a data table with a red question mark beside
it), and the new names can be pasted from Excel.
--
Bruce Weaver
"When all else fails, RTFM."
Bruce Weaver
2009-01-30 01:20:18 UTC
Permalink
Post by m***@gmail.com
Hello Bruce,
Thanks. But I'm afraid that I have just learned from SPSS in a phone
conversation that the problem is the following: "It's a bug."
I like to create variable names in excel because it's efficient. For
example, let's say I have an 18-item scale that assesses need for
cognition. I might like to name these variables nfc1, nfc2,...nfc18.
In excel I can create these names immediately by staring with the
first two names, nfc1 and nfc2, and then dragging down the column.
It's also very easy in SPSS syntax. E.g.,

numeric nfc1 to nfc18 (f5.0).
exe.
Post by m***@gmail.com
Likewise, sometimes I collect data online. It's very efficient to copy
the names of the form items in html into excel, then I can quickly
paste them into SPSS.
As I said in my earlier post, you could just as easily paste them
into a RENAME VARIABLES command. But it sounds like you are not a
syntax user.
Post by m***@gmail.com
Let me reiterate, though, this this happens *and there are no illegal
characters* in the variable names. I can further demonstrate this
because I can open a file in SPSS that already has the variables in
place. If I were to want to copy some of the variable names from that
file into a new SPSS file, I get the same error message.
SPSS told me that "they are aware" of the problem and will try to
address it in the next patch.
For the life of me, I don't know why I let go of v. 15. I should have
learned my lesson after seeing v. 16.
Best,
Mary
--
Bruce Weaver
***@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."
JKPeck
2009-01-30 03:37:42 UTC
Permalink
Post by m***@gmail.com
Hello Bruce,
Thanks. But I'm afraid that I have just learned from SPSS in a phone
conversation that the problem is the following: "It's a bug."
I like to create variable names in excel because it's efficient. For
example, let's say I have an 18-item scale that assesses need for
cognition. I might like to name these variables nfc1, nfc2,...nfc18.
In excel I can create these names immediately by staring with the
first two names, nfc1 and nfc2, and then dragging down the column.
It's also very easy in SPSS syntax.  E.g.,
numeric nfc1 to nfc18 (f5.0).
exe.
Post by m***@gmail.com
Likewise, sometimes I collect data online. It's very efficient to copy
the names of the form items in html into excel, then I can quickly
paste them into SPSS.
As I said in my earlier post, you could just as easily paste them
into a RENAME VARIABLES command.  But it sounds like you are not a
syntax user.
Post by m***@gmail.com
Let me reiterate, though, this this happens *and there are no illegal
characters* in the variable names. I can further demonstrate this
because I can open a file in SPSS that already has the variables in
place. If I were to want to copy some of the variable names from that
file into a new SPSS file, I get the same error message.
SPSS told me that "they are aware" of the problem and will try to
address it in the next patch.
For the life of me, I don't know why I let go of v. 15. I should have
learned my lesson after seeing v. 16.
Best,
Mary
--
Bruce Weaver
"When all else fails, RTFM."
I just received notification 10 minutes ago that this bug has been
resolved for the next maintenance release. (I can't comment on the
release date for that at this time.)

Regards,
Jon Peck
m***@gmail.com
2009-01-30 14:18:11 UTC
Permalink
Thanks Jon, very helpful. I use syntax extensively, but knowing that
the bug in the program will be resolved will be helpful.

Kind regards,

Mary
f***@lsc.gov.uk
2009-02-02 10:56:26 UTC
Permalink
Presumably if you have a list of variables in one column, say A, you
could add in a formula to another column, eg

="COMPUTE " & A1 & "=-1."

Which you could use to create a block of syntax to create the
variables that way, and then in spss add in a recode for -1 to sysmis.
It would be a way round your current problem.

Fred
Post by m***@gmail.com
Thanks Jon, very helpful. I use syntax extensively, but knowing that
the bug in the program will be resolved will be helpful.
Kind regards,
Mary
a***@gmail.com
2015-04-08 09:26:05 UTC
Permalink
Post by m***@gmail.com
Hi All,
I'm using SPSS 17, and I'm having problems pasting variable names from
a list (column) in excel to the variable name column in SPSS. I keep
getting the following error message: "Variable name contains an
illegal character". But there are no illegal characters involved!
Further, it will not give me this error message if I try to paste only
a small number of variable names (e.g., 2 names).
This is something that I have routinely used in the past with v. 15
with no problems. Indeed, if I use the same excel file with the same
names, it will paste perfectly with version 15, but will not with
version 17.
Also, this problem doesn't seem to be consistent. Sometimes it will
work ok, others not.
Any thoughts? I'm losing my mind here.
Thanks!
Mary
Don't use 'Space' in between variable names and dont start variable name with numbers thats it
sometimes spss do not accept capital letters ... i don't know why.. but it works
d***@gmail.com
2018-05-12 06:22:40 UTC
Permalink
Tks allthewa, it works for me
Andy
2018-10-16 03:18:43 UTC
Permalink
Post by m***@gmail.com
Hi All,
I'm using SPSS 17, and I'm having problems pasting variable names from
a list (column) in excel to the variable name column in SPSS. I keep
getting the following error message: "Variable name contains an
illegal character". But there are no illegal characters involved!
Further, it will not give me this error message if I try to paste only
a small number of variable names (e.g., 2 names).
This is something that I have routinely used in the past with v. 15
with no problems. Indeed, if I use the same excel file with the same
names, it will paste perfectly with version 15, but will not with
version 17.
Also, this problem doesn't seem to be consistent. Sometimes it will
work ok, others not.
Any thoughts? I'm losing my mind here.
Thanks!
Mary
I encountered the same problem. You can try to copy those variable names from excel to text(unformatted) first, then copy from text to spss. It works. Hope it can help all who have the same problem...
CHELSEA BRIDGE WHARF
2018-10-17 21:33:21 UTC
Permalink
I wonder if pasting as plain text into word first and then to paste into SPSS would work? Possibly some formatting is being inserted by excel that SPSS doesn't like? Worth a shot if not tried already
Post by m***@gmail.com
Hi All,
I'm using SPSS 17, and I'm having problems pasting variable names from
a list (column) in excel to the variable name column in SPSS. I keep
getting the following error message: "Variable name contains an
illegal character". But there are no illegal characters involved!
Further, it will not give me this error message if I try to paste only
a small number of variable names (e.g., 2 names).
This is something that I have routinely used in the past with v. 15
with no problems. Indeed, if I use the same excel file with the same
names, it will paste perfectly with version 15, but will not with
version 17.
Also, this problem doesn't seem to be consistent. Sometimes it will
work ok, others not.
Any thoughts? I'm losing my mind here.
Thanks!
Mary
Bruce Weaver
2018-10-17 22:10:15 UTC
Permalink
Post by CHELSEA BRIDGE WHARF
I wonder if pasting as plain text into word first and then to paste into SPSS would work? Possibly some formatting is being inserted by excel that SPSS doesn't like? Worth a shot if not tried already
When using that trick, I always paste into a text editor (e.g., Notepad, EditPad, etc.) rather than into Word.
Andy
2018-10-18 01:24:25 UTC
Permalink
在 2018年10月18日星期四 UTC+8上午5:33:23,CHELSEA BRIDGE WHARF写道:
Post by CHELSEA BRIDGE WHARF
I wonder if pasting as plain text into word first and then to paste into SPSS would work? Possibly some formatting is being inserted by excel that SPSS doesn't like? Worth a shot if not tried already
Post by m***@gmail.com
Hi All,
I'm using SPSS 17, and I'm having problems pasting variable names from
a list (column) in excel to the variable name column in SPSS. I keep
getting the following error message: "Variable name contains an
illegal character". But there are no illegal characters involved!
Further, it will not give me this error message if I try to paste only
a small number of variable names (e.g., 2 names).
This is something that I have routinely used in the past with v. 15
with no problems. Indeed, if I use the same excel file with the same
names, it will paste perfectly with version 15, but will not with
version 17.
Also, this problem doesn't seem to be consistent. Sometimes it will
work ok, others not.
Any thoughts? I'm losing my mind here.
Thanks!
Mary
My friend said word worked. However not in my computer. I guess it depends. But plain text is the best way.
Continue reading on narkive:
Search results for 'Variable name contains an illegal character' (newsgroups and mailing lists)
58
replies
character sets
started 2004-03-15 23:45:46 UTC
clisp-list@lists.sourceforge.net
14
replies
C++ name with leading underscore character not Compiling
started 2007-04-16 14:34:10 UTC
cygwin@cygwin.com
12
replies
[fpc-devel] Hi listers, , , , I am trying to translate a C header with H2PAS, however, I have nver done it, so the difficulties are meaningful., , I am blind, I use screen readers and IUP is the single graphical interface library accessible to program with a screen reader and to navigate in the output dialogs. As my purpose is not to produce beautiful windows, my public will be blind or visually impaired people, users of screen readers, for me, it's wonderful to use IUP to create my dialogs.,,I have tested IUP with Lua. This library is really what I want. But I would like to use IUP with Pascal, but unfortunately there's no a IUP binding for Pascal. Now, it's time to do it and I want to be successful in this task., , I am rying to translate headers with this commandline:, , h2pas -d {C file name},,With this command, I translated the first one. Now I am trying to translate iupkey.h, but I am not able to identify the errors., , After "h2pas -d iupkey.h", I got the following message, but I could not interprete It. What is wrong? Regarding the source code is downloaded from the official website, why have I sintax errors? Illegal characters? Why?, , at line 21 error : syntax error,at line 41 error : syntax error,Illegal character in line 45, "#define K_at '@' /* 64 */", Illegal character in line 73, "#define K_backslash '\\' /* 92 */", Illegal character in line 73, "#define K_backslash '\\' /* 92 */",Illegal character in line 75,"#define K_circum '^' /* 94 */",Illegal character in line 77,"#define K_grave '`' /* 96 */", Illegal character in line 113, "#define K_BS '\b' /* 8 */", Illegal character in line 114, "#define K_TAB '\t' /* 9 */", Illegal character in line 115,"#define K_LF '\n' /* 10 (0x0A) not a real key, is a combination of CR with a modifier, just to document */", Illegal character in line 116,"#define K_CR '\r' /* 13 (0x0D) */",LexLib: yytext overflow, , , , The C source is attached., , Thank ou in advance, any help is welcome!, , Luciano
started 2011-06-15 04:34:24 UTC
fpc-devel@lists.freepascal.org
10
replies
sphinterpolate: NetCDF: Name contains illegal characters?
started 2009-12-08 20:38:16 UTC
gmt-help@lists.hawaii.edu
15
replies
[Assp-user] Attachments.
started 2004-01-27 20:09:53 UTC
assp-user@lists.sourceforge.net
Loading...