Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: saving tables in spreadsheet format


From   Joly.Patrick@ic.gc.ca
To   statalist@hsphsun2.harvard.edu
Subject   st: RE: RE: saving tables in spreadsheet format
Date   Fri, 13 Sep 2002 10:37:20 -0400

Apologies, I was too quick on the send button, I thought I had read
'contents of the data'.  Oops.

A solution might something along the lines of

preserve
tabulate varname1 [varname2], matcell(mymat) ...
svmat mymat
outsheet using mymat.dta
restore

This won't provide you with the column names or row names yet, but might be
possible by using the matcol() and matrow() options at -tabulate ...-.  Let
me look further into it.

Patrick Joly
joly.patrick@ic.gc.ca
pat.joly@utoronto.ca


-----Original Message-----
From: Joly, Patrick: IAC 
Sent: Friday, September 13, 2002 10:28 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: RE: saving tables in spreadsheet format


outsheet is your friend (the reciprocal of insheet to load comma- or
tab-delimit files).  see -help outsheet-.  Tab-delimited is the default but
you may specify comma.

Patrick Joly
joly.patrick@ic.gc.ca
pat.joly@utoronto.ca


-----Original Message-----
From: gcruces@worldbank.org [mailto:gcruces@worldbank.org]
Sent: Friday, September 13, 2002 9:45 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: saving tables in spreadsheet format


Hello statlist,

I was wondering if there is a program in Stata to output the content of a
table
into tab or comma separated values (so that it can be open automatically by
Excel or other spreadsheet programs). "outreg" is amazing, but as far as I
know
it only works with regression output. "outtable" is great too, but it only
converts matrices (and only to Tex).
the "Copy table" option works perfectly, but it is not really convenient for
a)
Large tables, b) Large number of tables.
if not available, I could try to write one.

thanks! best,

***************************
Guillermo Cruces

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