Announcement

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

  • asdoc error [exporting tables to word]

    Hello,
    I am trying to export tables to word. I was successfully able to use the asdoc command briefly, but now it just won't work anymore. Does anyone know why this is happening and how to fix it?

    This is my code:
    Code:
    asdoc table(survmnth) () (naics_21), statistic(mean hrlyearn ahrsmain) statistic(sum ahrsmain) replace
    asdoc table(survmnth) (lfsstat)(naics_21), statistic(frequency) append
    This is the error I get:
    Code:
    (file TabularReport2019.doc not found)
    invalid 'dec' 
                     stata():  3598  Stata returned error
                 asdocrest():     -  function returned error
                     <istmt>:     -  function returned error
    r(3598);
    
    end of do-file

  • #2
    To anyone else having similar issues, I was not able to get the asdoc command to work for me. But the following code worked perfectly. You can change the 'replace' to 'append' if you want multiple tables on the same word document

    Code:
    table(survmnth) () (naics_21), statistic(mean hrlyearn ahrsmain) statistic(sum ahrsmain)
    collect export "2019_Tables_Averages", as(docx) replace
    table(survmnth) (lfsstat)(naics_21), statistic(frequency)
    collect export "2019_Tables_Employment", as(docx) replace

    Comment

    Working...
    X