The colwise option works for multiple return results. You just have one returned result, the matrix r(StatTotal). To get the table you want, just transpose the matrix using the ' operator.
putexcel A1=matrix(r(StatTotal)', names) using test.xlsx, sheet("Results") colwise replace
↧
Re: Creating Excel tables with putexcel, part 1: Introduction and formatting
↧