Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Problem with variable when importing data from Microsoft Excel


From   Joseph Monte <[email protected]>
To   statalist <[email protected]>
Subject   st: Problem with variable when importing data from Microsoft Excel
Date   Tue, 6 Nov 2012 16:49:53 +0000

Dear Statalisters,

I am trying to import a Microsoft Excel file into Stata 12. I am
having a problem with one of the variables (var1) which has multiple
values for a given id.

If I save the file as a .csv, then use -insheet- and then

split var1, p(" ")

and then -reshape-

I get the following output for var1 for the given id, which is what I want.

var1
-
-
-
-
-
11.00
11.00
6.00

However, if I import the file into Stata using -import excel-, var1 is
displayed as
-----11.0011.006.00 (I don't know how to -split- on this since there
is no space or any other character in between values)

Is there any way I can get the desired output by using -import excel- ?

Any help/suggestions would be much appreciated.

Joe
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index