Announcement

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

  • Carriage returns in table in Open Office XML file

    Stata can create Open Office XML (*.docx) files. The commands below, taken from help mf__docx, create a table with observations from the current dataset. If you run the commands and open the saved document, you will see that each cell starts with a carriage return so that the table is twice as long as it needs to be. How can these carriage returns be suppressed?
    Code:
    mata:
    dh = _docx_new()
    end
    
    sysuse auto
    
    mata:
    _docx_add_data(dh, 1, 1, (1,10), ("mpg", "price", "foreign"))
    end
    
    mata:
    res = _docx_save(dh, "example.docx")
    end
    This is a repost of a message originally posted in the General forum.

    http://www.statalist.org/forums/foru...ffice-xml-file

  • #2
    _docx_add_data() adds text in each cell starting with a new paragraph, hence the carriage return. We will look into if there is a way to suppress it.
    Last edited by Hua Peng (StataCorp); 20 Apr 2015, 12:33.

    Comment

    Working...
    X