Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: Re: st: importing data from excel


From   "Julia Spies" <JuliaSpies@gmx.de>
To   statalist@hsphsun2.harvard.edu, statalist@hsphsun2.harvard.edu
Subject   Re: Re: st: importing data from excel
Date   Thu, 20 Jul 2006 11:30:18 +0200

Hello,

thanks to everyone for the suggestions! 

@Svend: The language settings actually appear to be the problem. However, changing them afterwards does not solve the problem, since switching to english makes the data appear like in stata before (cut decimal places). 

Stata/Transfer does the job perfectly. Since i don't possess it myself i thought there would be a way around...but well, next time, i can change the language settings in windows before collecting the data, things should work out then.

Regards,
Julia

-------- Original-Nachricht --------
Datum: Wed, 19 Jul 2006 22:48:27 +0200
Von: "Svend Juul" <SJ@SOCI.AU.DK>
An: statalist@hsphsun2.harvard.edu
Betreff: Re: st: importing data from excel

> Julia wrote:
> 
> after having imported data from Excel, I noticed that for some variables
> Stata cutted the decimal places and considered these variables as two
> seperate variables.
> E.g. Var1: 15,25 --> Var1: 15, Var2: 25
> Strangely, this does not happen to all comma-containing variables
> (although they all have the same format in Excel). Anyone a clue why this
> happens and what can be done about it?
> ---------------------------------------
> 
> Keto suggested to replace commas by periods in the Excel file. This would
> work only for text cells, not for numeric cells.
> 
> Ron=E1n recommended to either to change Excel to display decimal periods,
> or tell Stata to display decimal commas (-set dp comma-).
> 
> I assume we work in Windows. You don't change the Excel settings but
> the Windows settings to display decimal periods. In Windows XP it is:
>      [Start] > Settings > Control panel > Regional and Language Options
> 
> Stata would never understand decimal commas in input, so the solution
> is to choose the Windows settings to display decimal periods.
> 
> Hope this helps
> Svend
> 
> ________________________________________________________
> 
> Svend Juul
> Institut for Folkesundhed, Afdeling for Epidemiologi
> (Institute of Public Health, Department of Epidemiology)
> Vennelyst Boulevard 6
> DK-8000 Aarhus C,  Denmark
> Phone, work:  +45 8942 6090
> Phone, home:  +45 8693 7796
> Fax:          +45 8613 1580
> E-mail:       sj@soci.au.dk
> _________________________________________________________
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

-- 
Universität Hohenheim 
Lehrstuhl für Außenwirtschaft

"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index