Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Export Excel: can I export only varnames and labels (dictionary)?

    I've exported my data to excel with firstrow(var). This is great
    On a separate sheet (same workbook), I'd like to make a sheet with varnames (col A) and labels (col B) - i.e., make a data dictionary. Is this possible? firstrow(varl) only seems to replace varname with the label - not what I'm looking for.. thanks!

  • #2
    labels = variable labels or value labels?

    Comment


    • #3
      variable labels

      Comment


      • #4
        Here's an example of the hard part of what you want, the rest is left as an exercise for the reader.
        Code:
        . sysuse auto, clear
        (1978 Automobile Data)
        
        . describe, replace clear
        
        . list in 1/5, noobs clean
        
            position       name    type   isnume~c   format   vallab               varlab  
                   1       make   str18          0    %-18s                Make and Model  
                   2      price     int          1   %8.0gc                         Price  
                   3        mpg     int          1    %8.0g                 Mileage (mpg)  
                   4      rep78     int          1    %8.0g            Repair Record 1978  
                   5   headroom   float          1    %6.1f                Headroom (in.)

        Comment

        Working...
        X