Hi there
I am using the following putexcel command to insert my simple two-way frequency table (agegroup by year) into an Excel spreadsheet:
.. which works nicely. However, I am missing the row and column totals. These are displayed in the Stata results window so I expect they are stored somewhere. I'd be grateful for any advice on how these can be recalled so that I can place them into the Excel spreadsheet too.
(I could, of course, easily do this in Excel itself but I am trying to get to grips with using putexcel!).
Many thanks for reading.
I am using the following putexcel command to insert my simple two-way frequency table (agegroup by year) into an Excel spreadsheet:
Code:
tab year agegrp, matcell(freq) matrow(years) putexcel A1=("Year") B1=("0-4") C1=("5-9") D1=("10-14") E1=("15-19") F1=("20-24") G1=("25+"), sh(1) putexcel A2=matrix(years) B2=matrix(freq) using "\\:myspreadsheet.xls", sh(1) modify
(I could, of course, easily do this in Excel itself but I am trying to get to grips with using putexcel!).
Many thanks for reading.
Comment