[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: importing data from excel
after having imported data from Excel, I noticed that for some variables
Stata cutted the decimal places and considered these variables as two
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
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
* For searches and help try: