Hi there,
Here's my code:
local vars "date"
foreach pre in `vars'{
putexcel set "tabout/cleaningtest_`pre'.xls", replace
putexcel A1="`pre'" A3=("Sample/Patient Characteristic") B3=("Mean (SD)")
tab `pre', matrow(hnames)
local hlevels = rowsof(hnames)
forvalues i = 1/`hlevels' {
local hal`i' = hnames[`i',1]
local hal_lab`i' : label (`pre') `hal`i''
local x = `i' +2
excelcol `x'
putexcel `r(column)'3=("`hal_lab`i''"),
My aim is to put a series of dates in the colums in the excel spreadsheet. It works perfectly except it the dates are in numeric form and not formatted as they are displayed in Stata.
I am using Stata 14.2
Many thanks in advance.
Related Posts with How does one put formatted date labels into excel with Putexcel?*
Selectively list date variable as matrix row name using macroGreetings, I'm hoping for some aid here. Having searched the forum for a solution, I've yet to find …
Code help: Monte Carlo simulationI've attached a small Do file for a Monte Carlo Simulation I am running for an economics class. For …
How to make a graph that shows reliable and clinically significant change in particular variable?Dear Statalisters, I appreciate if anyone can help with how to make a graph showing reliable and cl…
Interpretation for Vector Error Correction Model with 4 variables and 2 cointegration vectorsI have 4 time series variables, y, x, z, w,, which are filtered by tsmooth command. I tried to do co…
how to use stcurve for Cox model after multiple imputation?Hello, Statalist! I have a question about the stcurve after a multiple imputation. So, after the f…
Subscribe to:
Post Comments (Atom)
0 Response to How does one put formatted date labels into excel with Putexcel?*
Post a Comment