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
What is the "variable name column" in SPSS? Do you mean in the
Variable View tab of the Data Editor?
> I keep
> getting the following error message: "Variable name contains an
> illegal character". But there are no illegal characters involved!
But apparently there are.
> 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
bwe...@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."
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
> bwea...@lakeheadu.cahttp://sites.google.com/a/lakeheadu.ca/bweaver/
It's also very easy in SPSS syntax. E.g.,
numeric nfc1 to nfc18 (f5.0).
exe.
>
> 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.
>
> 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
bwe...@lakeheadu.ca
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
Kind regards,
Mary
="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
On Jan 30, 2:18 pm, "marybetholi...@gmail.com"