Hello,
I'm running into a problem when I attempt to use the export excel command.
I have defined a porgram called saveTtest, which ends by exporting to excel:
I am running t-tests over a loop of of five years. at the end of the loop, I call the program:
This returns the error, invalid '".xlsx'. I've tried playing around with the name of the file following export excel, and anytime i don't place quotes around `year' as if it were a loop, Stata simply exports a file called ttest_.xlsx. Any input as to what I'm doing wrong with this file name is appreciated.
I'm running into a problem when I attempt to use the export excel command.
I have defined a porgram called saveTtest, which ends by exporting to excel:
Code:
export excel using "$saveDir/ttest_"`year'".xlsx", /// sheet(data_`1') firstrow(var) sheetreplace
Code:
saveTtest "ttest_"`year'".xlsx"
Comment