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?*
Why inlist is limited to 250 argumentsI don't have a coding issue, I have more of a query about the inner workings of Stata. I'm using a s…
Difference in Difference estimation on carbon emissions in STATA 17.Dear STATA community, I have some questions regarding my analysis for my DID estimation. I am looki…
changing bar color Code: local barcall upper activemonth_final if inrange(activemonth_final, `=tm(2018m6)', `=tm(2018m…
Choosing model specification: region*time FEs vs. country-specific time trendsHello! I am trying to find the effect of drought on agricultural production using a model of the fo…
How do I keep the lowest numeric value for a variable on an annual basis over time?I have a focused question. I am working in long format. One of my variables is called “new_diff_days…
Subscribe to:
Post Comments (Atom)
0 Response to How does one put formatted date labels into excel with Putexcel?*
Post a Comment