Excel file scrambled in a few places on input

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Excel file scrambled in a few places on input

Art Kendall
I have an excel file in which I replaced all blank cells with "blank".
I do not have a row with variable names
All variables show in variables view as strings.

However, the data from some excel cells end up in the wrong variables in SPSS.

When I do FREQUENCIES on V1 I find text that occurs in other cells in other columns.

I also end up with more cases than there are rows in the excel file.

Has anyone encountered this before?

I am running SPSS v21.  
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Excel file scrambled in a few places on input

JosephYoungblood
Hi Art,

This sounds similar to a problem I have encountered when the excel data file is exported with improper settings re: tab or comma delimited.  The problem that I experienced could not be fixed in SPSS.

Best of luck

Joseph A. Youngblood
Reply | Threaded
Open this post in threaded view
|

Re: Excel file scrambled in a few places on input

Albert-Jan Roskam-2
In reply to this post by Art Kendall


----- Original Message -----

> From: Art Kendall <[hidden email]>
> To: [hidden email]
> Cc:
> Sent: Tuesday, July 29, 2014 11:56 PM
> Subject: [SPSSX-L] Excel file scrambled in a few places on input
>
> I have an excel file in which I replaced all blank cells with "blank".
> I do not have a row with variable names
> All variables show in variables view as strings.
>
> However, the data from some excel cells end up in the wrong variables in
> SPSS.
>
> When I do FREQUENCIES on V1 I find text that occurs in other cells in other
> columns.
>
> I also end up with more cases than there are rows in the excel file.
>
> Has anyone encountered this before?
>
> I am running SPSS v21. 

Could you be more specific: xls, xlsx or csv?
--xls: generally ok. Usually problems are caused by Excel, not SPSS (e.g., Excel decides that disease code '01-01' should actually be 'Jan-1').
--xlsx: I avoid this like the plague. Too many xlsx related stuff on the Fixpack fixlists
--character-separated values: improperly escaped values with separators in them (e.g an embedded tab)

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Excel file scrambled in a few places on input

Lemon, John S.
SPSS tends to be a little idiosyncratic as to what it find in the first row of an Excel file, often using the cell contents of that row to type the rest of the column. In the past I have found that putting a 'dummy' row with every cell in the first row containing the type of data you would expect in subsequent rows then it tends to work; i.e. a date for date columns, strings and numbers etc. Also formatting the columns with the type of data you expect also helps.

Best Wishes

John S. Lemon

Emeritus Computing Advisor
Please note I retired from the University on 30th June 2014
m: +44 (0) 7710 491780 | e:[hidden email]

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Albert-Jan Roskam
Sent: 30 July 2014 08:05
To: [hidden email]
Subject: Re: Excel file scrambled in a few places on input



----- Original Message -----

> From: Art Kendall <[hidden email]>
> To: [hidden email]
> Cc:
> Sent: Tuesday, July 29, 2014 11:56 PM
> Subject: [SPSSX-L] Excel file scrambled in a few places on input
>
> I have an excel file in which I replaced all blank cells with "blank".
> I do not have a row with variable names All variables show in
> variables view as strings.
>
> However, the data from some excel cells end up in the wrong variables
> in SPSS.
>
> When I do FREQUENCIES on V1 I find text that occurs in other cells in
> other columns.
>
> I also end up with more cases than there are rows in the excel file.
>
> Has anyone encountered this before?
>
> I am running SPSS v21.

Could you be more specific: xls, xlsx or csv?
--xls: generally ok. Usually problems are caused by Excel, not SPSS (e.g., Excel decides that disease code '01-01' should actually be 'Jan-1').
--xlsx: I avoid this like the plague. Too many xlsx related stuff on the Fixpack fixlists --character-separated values: improperly escaped values with separators in them (e.g an embedded tab)

=====================
To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


The University of Aberdeen is a charity registered in Scotland, No SC013683.
Tha Oilthigh Obar Dheathain na charthannas clàraichte ann an Alba, Àir. SC013683.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Excel file scrambled in a few places on input

JosephYoungblood
In reply to this post by Albert-Jan Roskam-2
Save the excel file as a text file, default setting should be tab delimited.  Import into SPSS as a text file "flat file".  Let me know if that works.  Otherwise send me  a PM, I'd be more than happy to assist you.