help mexcel (User-written stata packages: mtab)

Title

mexcel -- Export results from a matrix to an Excel file

Syntax

mexcel
namelist
[if] [in]
[, options
]

namelist indicates the column names in Excel

Options
Matrix(varlist:name) the name of matrix with results

row the row number in the Excel

Description

Command mexcel export results from matrix to Excel.

Options

Matrix(varlist:name) the name of matrix with results.

row specify which row in Excel to be the starting point. For example if you decided to put the results from E3 - E5, then staring point is 3, therefore row=3

Examples

1. load an oneline data

.webuse lbw

2. makes an one-way table and store the results (frequencies and percentages)

.mtab1 smoke

.mat F=r(frequency)

.mat P=r(percent)

3. put the results (frequencies and percentages) into Excel

.putexcel set trymtab, sheet(A) modify

.mexel B, m(F) r(3)

.mexel C, m(P) r(3)

More examples

click on her

Author

Chunsen Wu, the University of Southern Denmark; Odense University Hospital, Denmark

cwu@health.sdu.dk

chunsen.wu@rsyd.dk

Also see

Help: mtab, mtab1, mtab2, msum, mest, mmat, and mobs