[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: Problem with embedded quotes in strings when using insheet
There may be a way to get Excel to stop producing the double quotes.
But it might not work with tab-delimited files.
I've always resorted to a good text editor's find-and-replace after the
save from Excel and before using insheet in Stata. For example, search
on tab-quote-quote and replace with tab. For an editor, use something
like TextPad if you're on a PC, a derivative of Alpha on the Mac (and
Linux?), or a derivative of Emacs anywhere.
Asking Stata to figure out the quote characters will probably be far
too much work.
On Mar 30, 2005, at 9:30 PM, David E Moore wrote:
I write out a portion of the data currently held in memory, including
string variable values, using -outsheet-. Some of the strings have
quotes (not always balanced) embedded in them. (I know, I shouldn't
allowed this in the first place.) When I -outsheet- the data it looks
fine and I can read it into Excel just fine. Now, I want to append
more data to
that file, so I -insheet- the original, append the new data, and
again. When I -insheet- the data, the embedded quotes confuse the
heck out of
the -insheet- parser and the data are no longer fine. I can provide
what happens, but that isn't really relevant.
* For searches and help try: