Hi everyone, I am previously an R-user and finding the functionality of STATA frustrating. I want to output a large table into Excel. The table calculates means and frequencies of age for each postcode area. I have written the following code to run the table and capture it as a matrix, and then export, but my first line of code will not work. Please help.
capture quietly table postcode, contents(freq mean age median age min age max age), matcell(X)
capture quietly matrix list X
putexcel set "C:\PROJECT\means.xlsx", sheet("age") modify
capture putexcel A1=matrix(X)
capture matrix drop X
Related Posts with Help exporting to excel
esttab summary stats tableHello, I am using estout package to create my summary stats table. I only want the stats for one v…
Creating bar chart with multiple binary variablesHi, I am attempting to create a bar chart in Stata that shows proportions for multiple different bin…
miliseconds datetime convertionHi , my dataset has a datetime string like this: Code: clear input str28 activityDateTime "2022-1…
gen var1=var2, generates some wrong values Code: gen geo3= geo3_bd2001 gives the following values. I wonder what might cause this. Any idea pl…
Is there a good way to test whether explanatory power among variables varies across populations?Let's imagine I want to assess whether the explanatory power of daily calories, minutes of exercise,…
Subscribe to:
Post Comments (Atom)
0 Response to Help exporting to excel
Post a Comment