Statalist


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

Re: st: space trouble in excel to stata conversion


From   "David Elliott" <[email protected]>
To   [email protected]
Subject   Re: st: space trouble in excel to stata conversion
Date   Fri, 3 Oct 2008 23:33:31 -0300

I think Nick is most likely right.  Try the command:
 -list my_problem_var if strpos(my_problem_var,char(160))>0-
where my_problem_var is the variable with the persistent spaces.  If
you get a listing you can then use:
-replace my_problem_var = subinstr(my_problem_var,char(160),"",.)-
to clean the spaces.

ASCII 32 is the normal space as Nick indicated.  The only other space
character is ASCII 160 the "no break space."  Any other "exotic
characters"* show up as a vertical rectangle.

DCE

*excepting statalisters, the original exotic characters
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index