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]

Re: st: import .xls data into STATA


From   Dan Blanchette <[email protected]>
To   [email protected]
Subject   Re: st: import .xls data into STATA
Date   Mon, 26 Sep 2011 13:49:18 -0400 (EDT)

Just wanting to add to this thread my recent experience with the new Stata 12 command -import excel-.

Stata developers are currently working on a fix of some
problems Stata 12 has when importing an Excel file with
-import excel-.  I reported to Stata that a text cell in Excel
that contains more than one font or more than one font color will be read in as a missing value in Stata. So, if you see a cell in your Excel spreadsheet that has more than one font in it or some of the letters are in a different color, you will benefit from exporting your Excel file to a csv file. Also,
cells that have some binary character in it may also become a
missing value in Stata.

These problems should be fixed in the next update of the Stata 12 executable whenever that gets released.

This situation is going to stay the same:
In Excel if you see a cell that only has the value:

 TRUE

or:

 FALSE

Stata 12 will have -import excel- read it in as the number 1 (TRUE) or 0 (FALSE) even if the whole column is read in as
a string variable because Excel stores the word "TRUE" as the
number 1 and the word "FALSE" as the number 0 when that is the
only text in the cell and the cell is in General format.

BTW, -import excel- and -export excel- assume you are not interested in the first row being the variable names unless
you specify that you want that to be the case.

HTH,

Dan Blanchette
Research Programming Services
Carolina Population Center
University of North Carolina
Chapel Hill, NC 27516 USA
[email protected]



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


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