Announcement

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

  • table1 command

    I am trying to export stata data to an excel file using the table 1 command. I am able to see the results in stata but it is not creating an excel file. The error message I get is:

    _xlshwritestrcol(): 9901 Stata returned error
    export_excel_write_file(): - function returned error
    export_excel_export_file(): - function returned error
    <istmt>: - function returned error


    Please help.

  • #2
    please read the FAQ which has excellent advice on how to ask questions that can be answered - but here is my guess: first, "export excel" is for exporting data sets, not results; second, the table1 (not table 1) command has, in my opinion, been superseded by "table1_mc" - use -search- to find and download/install; third, when I use this command, I just copy-and-paste it into a word processor file; why do you want it in a spreadsheet file? I don't know if the results of this command can easily be put into a spreadsheet; you might be better off using official Stata commands such as -table- or -dtable- and using their associated "export" options; see, e.g.,
    Code:
    h dtable

    Comment


    • #3
      webuse lbw, clear

      * Run the linear regression
      regress bwt c.age##c.age i.smoke##i.ht
      putexcel set myfile, replace
      putexcel A2= matrix(r(table)') B1=("Coefficient") C1=("Std. Err.") D1=("t-value") E1=("p-value") F1=("95% CI Lower") G1=("95% CI Upper"), rownames

      here we go!!! check this example and edit by yourself #1

      Comment

      Working...
      X