Announcement

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

  • Can asdoc output be exported as HTML?

    I would like to export asdoc (from SSC) or asdocx output as a HTML table? I searched the help files, but did not find any reference to making such tables.

  • #2
    The need for html table arose when I wanted to post example tables of asdocx on its website. I wrote the html routines some time ago. Since this addition was motivated by asdocx’s website and that nobody asked for it, I forgot to properly document it.

    You might like to know that all the table on this page https://fintechprofessor.com/asdocx/...s-with-asdocx/ and many other pages are created by asdocx. What you need to do is to use the save() option and add .html as a file extension. For example,
    Code:
    sysue auto, clear
    asdocx sum, save(Myfile.html)
    And your html table is ready. The css that I use on the asdocx’s website is given below:

    HTML Code:
    div.indent4 {
      text-indent: 25px;
    }
    .center {
      margin-left: auto;
      margin-right: auto;
    }
    
    table.table1 {
      border-collapse: collapse;
      table-layout: auto;
      width: 870px!important;
      margin-left: auto;
      margin-right: auto;
      
    }
    
    table.table2 {
      border-collapse: collapse;
      table-layout: auto;
      width: 700px!important;
      margin-left: auto;
      margin-right: auto;
      
    }
    .asdocxtable {
        background: #eea31b1f;
        margin-top: 30px;
        margin-bottom: 30px;
        padding: 30px;
    }
    .asdocxtable-compact {
        background: #eea31b1f;
        margin-top: 30px;
        margin-bottom: 30px;
        padding: 20px;
        font-size: 14px;
    }
    tr.top1 {
      border-top: .5px solid black;
      text-align:left;
    
    }
    tr.top2  {
      border-top: 1px solid black;;
    }
    
    tr.bottom  {
      border-bottom: 1px solid black;;
    }
    
    td.left{
        text-align:left;
    }
    td.right{
        text-align:right;
    }
    th.left{
        text-align:left;
         height: 50px
    }
    th.right{
        text-align:right;
         height: 50px
    }
    Regards
    --------------------------------------------------
    Attaullah Shah, PhD.
    Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
    FinTechProfessor.com
    https://asdocx.com
    Check out my asdoc program, which sends outputs to MS Word.
    For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

    Comment

    Working...
    X