Hi! I have been having some problems with the putdocx and tab2docx commands.
Here is something that I have run successfully:
local school_tab "school_dropwhy textbooks_maths textbooks_chewa textbooks_eng textbooks_sci textbooks_his textbooks_bio notebooks penspencils erasers edu_aspire readingability edu_important glasses"
quietly foreach x in `school_tab' {
putdocx clear
putdocx begin
tab2docx `x' if survey_string == "1f" & School == 0
putdocx save "`x'", replace
}
The above commands have enabled me to export the tabulation results to Word documents. Unfortunately, it is tedious since Stata exports the results of each tabulation to a separate Word file.
To export the tabulation results into one single Word file, I have tried to re-arrange the commands:
putdocx clear
putdocx begin
local school_tab "school_dropwhy textbooks_maths textbooks_chewa textbooks_eng textbooks_sci textbooks_his textbooks_bio notebooks penspencils erasers edu_aspire readingability edu_important glasses"
quietly foreach x in `school_tab' {
tab2docx `x' if survey_string == "1f" & School == 0
putdocx save "`x'", replace
}
However, this has rendered the tab2docx command invalid, which I don't understand.
Could someone please help me out?
Very much appreciated!
Here is something that I have run successfully:
local school_tab "school_dropwhy textbooks_maths textbooks_chewa textbooks_eng textbooks_sci textbooks_his textbooks_bio notebooks penspencils erasers edu_aspire readingability edu_important glasses"
quietly foreach x in `school_tab' {
putdocx clear
putdocx begin
tab2docx `x' if survey_string == "1f" & School == 0
putdocx save "`x'", replace
}
The above commands have enabled me to export the tabulation results to Word documents. Unfortunately, it is tedious since Stata exports the results of each tabulation to a separate Word file.
To export the tabulation results into one single Word file, I have tried to re-arrange the commands:
putdocx clear
putdocx begin
local school_tab "school_dropwhy textbooks_maths textbooks_chewa textbooks_eng textbooks_sci textbooks_his textbooks_bio notebooks penspencils erasers edu_aspire readingability edu_important glasses"
quietly foreach x in `school_tab' {
tab2docx `x' if survey_string == "1f" & School == 0
putdocx save "`x'", replace
}
However, this has rendered the tab2docx command invalid, which I don't understand.
Could someone please help me out?
Very much appreciated!
Comment