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


From   Friedrich Huebler <[email protected]>
To   [email protected]
Subject   Re: st: RE: Strings dropped when importing Excel file
Date   Fri, 8 Nov 2013 14:17:38 -0500

Thank you, Joe. This works. Stata now imports #N/A as "#N/A (same for
#DIV/0! and #VALUE!) and no information is lost.

Friedrich

On Fri, Nov 8, 2013 at 1:56 PM, Joe Canner <[email protected]> wrote:
> 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/


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