Announcement

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

  • Exporting multiple tabulate tables to Excel

    Hello Stata masters!

    I would like to share a really basic question.
    I am trying to export multiple tabulate tables to Excel.
    I've tried to following commands, but none of them worked.

    foreach var10 of varlist profkno_relcurristand - stuacaprog_data {

    tab2xl loc `var10' using "file_2", col(1) row(1)

    }

    foreach var10 of varlist profkno_relcurristand - stuacaprog_data {

    putexcel set summary
    tab loc `var10'
    putexcel save

    }

    I kept getting the following error message:

    Excel file open
    Type putexcel save to save the existing open file. Type

    putexcel describe

    to see current settings.
Working...
X