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

st: RE: -desc- output in excel


From   Roger Newson <roger.newson@kcl.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: RE: -desc- output in excel
Date   Tue, 01 Apr 2003 12:37:49 +0100

At 08:42 01/04/03 +0200, Daniel Müller wrote (in reply to Radu Ban):
> i want to have a description file for my dataset (i.e.
> names, types, labels).
>
> so i used -desc-, logged the output, saved as a text file
> and opened it in excel. while excel did recognize that the text is
> formatted as a table, some of the label names were too long and they
> occupied more than one line.
>
> is there a way to make sure that the output of -desc-
> is displayed such that each variable occupies only one row?

I think -findit descsave- might do what you want (though I never tried it).
Yes, -descsave- should do what Radu wants. If Radu types

tempfile tf1
descsave,saving(`tf1',replace)
preserve
use `tf1',clear
outsheet using desc1.txt,replace
restore

then -desc1.txt- should be a generic tab-delimited worksheet importable into Excel, with 1 observation per variable in the old data set and data on variable names, types, formats, variable labels and value label names.

Best wishes

Roger



--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: roger.newson@kcl.ac.uk

Opinions expressed are those of the author, not the institution.


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