string data problem

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

string data problem

Rajeshms
Hi ,

I have string data say for eg. disease codes. When I import it from excel its not showing me the decimals digits.I am using SPSS 20. 

because my codes are like as follows

23.0
12.36
12.369
v236.56

but as soon as i import it , i am not getting the decimal places in spss data editor and i cant even edit also. any solutions?



--
Regards,

Rajesh M S




Reply | Threaded
Open this post in threaded view
|

Re: string data problem

Ruben Geert van den Berg
Dear Rajesh,

I can't tell from your post what the exact problem is. However, it sounds as if some codes may be converted into numbers. This would happen for columns that can be represented numerically (so don't contain "v236.56" for instance).

Anyway, what you could try is to save the Excel file (from Excel) as .csv (=Comma Separated Values). Now you can explicitly specify all variables to be interpreted as strings even if they contain only numbers.

If that doesn't solve the problem, please give us some more detail or (better) upload a small test data file with which the problem occurs.

HTH,

Ruben
Reply | Threaded
Open this post in threaded view
|

Re: string data problem

Rich Ulrich
In reply to this post by Rajeshms
There are two things here that sort of unbelievable.
 - You get a string variable successfully imported, but it is
is systematically truncated at the period.  (Is the period shown?)
 - You can't edit "it" afterwords.

If truncation is an "import" problem, the only thing that comes
to mind is that SPSS (or EXCEL?) somehow invokes "period" as a
delimiter, but that doesn't make sense inside a string variable anyway.

So.  If it is imported successfully, what is the reported width?

What is the DISPLAY width?   - Are strings truncated when the display
format is too small?  What do you see when you ask for FREQ on the variable?
That is, does it show truncated string values?

Then, what else can you say about the failure to edit?  Is it just
that variable?  What is the symptom, in more detail?

--
Rich Ulrich



Date: Fri, 10 May 2013 15:16:26 +0530
From: [hidden email]
Subject: string data problem
To: [hidden email]

Hi ,

I have string data say for eg. disease codes. When I import it from excel its not showing me the decimals digits.I am using SPSS 20. 

because my codes are like as follows

23.0
12.36
12.369
v236.56

but as soon as i import it , i am not getting the decimal places in spss data editor and i cant even edit also. any solutions?

...

Reply | Threaded
Open this post in threaded view
|

Re: string data problem

David Marso
Administrator
In reply to this post by Rajeshms
For starters, save us all the anguish of speculation!
Post with an attachment of your EXCEL file, your SYNTAX and the evidence of truncation!
Other than that I have nothing more to say.
"i cant even edit"?? What does this even mean?

Rajeshms wrote
Hi ,

I have string data say for eg. disease codes. When I import it from excel
its not showing me the decimals digits.I am using SPSS 20.

because my codes are like as follows

23.0
12.36
12.369
v236.56

but as soon as i import it , i am not getting the decimal places in spss
data editor and i cant even edit also. any solutions?



--
Regards,

Rajesh M S
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"