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?*
Financial statement comparability (rangerun after rangestat?Dear All, In an earlier post (https://www.statalist.org/forums/for...fter-rangestat), I asked how to…
propensity score matching using pscore command..can someone help to understand the matching ways.. my problem is when i do stratification matching (…
Weighting data with IPW and mlogitDear all, I intend to manually calculate inverse probability weights (IPW) in order to use them in …
Generating Binary Variable using Local MacrosI have a panel dataset involving a bunch of different countries. I am looking to construct a local m…
Princiapl component analysisHello Nick Sir... need some help on pca to form an index... the commands are somehwat like this.. gl…
Subscribe to:
Post Comments (Atom)
0 Response to How does one put formatted date labels into excel with Putexcel?*
Post a Comment