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: RE: Strings dropped when importing Excel file


From   Joe Canner <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: Strings dropped when importing Excel file
Date   Fri, 8 Nov 2013 18:56:57 +0000

Freidrich,

-import excel- is fairly clever at figuring out the correct type and format of Excel spreadsheet variables, including, apparently, error/missing codes.  The only solution I can think of is to add a single quote before the "#N/A" and "#VALUES!".  This will trick Excel and Stata into thinking these are truly strings and not special codes.

Regards,
Joe Canner
Johns Hopkins University School of Medicine

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Friedrich Huebler
Sent: Friday, November 08, 2013 1:24 PM
To: [email protected]
Subject: st: Strings dropped when importing Excel file

I use Stata 12.1. When importing an Excel file with string variables (cell format "Text"), the variables are correctly imported as strings but the following entries are replaced by empty cells in Stata:

#N/A
#VALUE!

Is it possible to keep these strings? I found no information on this in the documentation for -import excel-. The -allstring- option makes no difference.

Thanks,

Friedrich
*
*   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/

*
*   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