Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: st: XML_TAB and Multicolumn Titles
From
Zurab Sajaia <[email protected]>
To
statalist <[email protected]>
Subject
RE: st: XML_TAB and Multicolumn Titles
Date
Mon, 4 Jun 2012 16:26:17 -0400
Hi Hassan,
-xml_tab- can read equation names as well from the matrix and output those strings, if there are repeating string they will be automatically merged:
matrix A = 1, 2, 3, 4
matrix colnames A = Weight Height Weight Height
matrix coleq A = January January February February
xml_tab A, showeq ...
This will produce the output you need.
Alternatively, you can specify column names super-column names directly as options for -xml_tab- (matrix col/rownames have length restriction and don't allow some symbols...), you can write simply:
xml_tab B, showeq cnames(Weight Height Weight Height) ceq(January January February February)
Hope this helps,
Zurab
> Date: Mon, 4 Jun 2012 12:13:12 -0400
> Subject: st: XML_TAB and Multicolumn Titles
> From: [email protected]
> To: [email protected]
>
> Hello,
>
> I am using xml_tab to output a matrix into a table that can be read by
> excel. Everything looks great, but I am having one difficulty. Above
> by column names, I would like to insert additional titles that cover
> (in excel: are merged over) multiple columns. Essentially, I would
> like something that looks like the following.
>
> |------- January ---------| |--------February---------|
> |--Weight--| |--Height--| |--Weight--| |--Height--|
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/