Statalist


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

st: Copy table--how to consistently get correct tab stops


From   David Radwin <radwin@berkeley.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Copy table--how to consistently get correct tab stops
Date   Thu, 5 Jul 2007 09:21:44 -0700

Dear Statalisters,

A long-standing source of minor aggravation to me is that the Copy Table command (in the Edit menu) does not consistently place the tab stops (characters) correctly, which means the table is incorrectly formatted when I paste it into Excel or Word. The problem doesn't happen in every instance. It seems to happen most often with cross-tabulations using -tab2-, but that might just because I create a lot of these cross-tabulations.

For example, after the creating this table:

sysuse auto
tab2 mpg rep78

if I "Copy table" and paste into Excel or Word, there is an extra column (that is, an extra tab) between the column for rep78=3 and the column for rep78=4. More often in my experience, the problem is a missing tab character, so two columns get combined into one. This scenario is much more time-consuming to correct. In this particular example, "Copy Table as HTML" gets the tabs correct, but that is not always the case. (I am using Intercooled Stata 9.2 on Macintosh, although long ago I encountered this same problem with IC v.6 on Windows.)

I realize there are other ways of getting your output to Excel, such as the excellent -tabout- and -outreg-, but I don't always want such a complicated solution to a simple copy-and-paste operation. Moreover, while I am otherwise enthusiastic about Stata, I am reluctant to recommend it to colleagues who depend on Excel and Word if they have to resort to these more complex workarounds to insert tables from Stata.

I read in the Stata-list archives that this bug would be fixed in an upcoming executable:

http://www.stata.com/statalist/archive/2004-04/msg00839.html

Can anyone tell me if Stata 10 has solved this problem? Or is there some solution in version 9 that I have overlooked?

Thanks,

David
--
David Radwin, Principal Analyst // radwin@berkeley.edu
Office of Student Research, University of California, Berkeley
2223 Fulton St # 2032, Berkeley, CA 94720-2032
Tel. 510.642.2097; Fax 510.642.2894
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index