asdocx: Export from Stata to Word, Excel, LaTeX & HTML › Forums › asdocx Forum › Trailing zeros but only for certain columns › Reply To: Trailing zeros but only for certain columns
You can control decimal points for each column separately using the option c#_dec()
. The #
is column number and dec(#)
sets the decimal points. In your case, count and p50 are in column 2 and 7, therefore, we shall use c2_dec(0)
and c7_dec(0)
. Since you wish to report zero decimal points in these columns, therefore we shall use dec(0)
.
sysuse auto, clear bysort foreign : asdocx sum price , detail stat(count mean sd var cv p50 skewness) /// title(title) font(Arial) dec(2) replace tzok c2_dec(0) c7_dec(0) 0 |1 2 3 4 5 6 7 8 ----+------------------------------------------------------------------------------------------ 1 |foreign N mean sd variance cv Median skewness ----+------------------------------------------------------------------------------------------ 2 |Domestic 52 6072.42 3097.10 9592054.92 0.51 4783 1.78 3 |Foreign 22 6384.68 2621.92 6874438.70 0.41 5759 1.22 ------------------------------------------------------------------------------------------------