-------------------------------------------------------------------------------
Title
dataout -- Exports dataset or tab-delimited file into various formats
Syntax
dataout <using filename> [, options]
Description
dataout provides a fast and easy way to export dataset or tab-delimited files into various output formats compatible with Latex, Word, and Excel.
Specify <using filename> if converting external tab-delimited file.
Specify save( ) if converting the current dataset in memory.
Options
+------+ ----+ Main +-------------------------------------------------------------
save( ) Must be specified when <using file> is not specified.
replace( ) Replace pre-exiting files.
tex Convert into Latex or tex compatible file.
excel Convert into Excel compatible file.
word Convert into Word compatible file.
nohead Force variable names not to be reported.
head Force column head to be reported.
auto(#) where # is the number of automatically formatted digits to be reported.
noauto No automatic formating.
dec(#) where # is the fixed number digits to be reported.
midborder(#) where # is the location of middle border. Default is mid(1).
Examples
* exporting dataset in memory sysuse auto, clear dataout, save(myfile) word tex excel replace
* collapse collapse (mean) mpg headroom price weight, by(turn) replace mpg=round(mpg,1) dataout, save(myfile) word tex excel replace
* contract sysuse auto, clear contract foreign rep78, p(percentage) cf(cumfreq) cp(cumperc) dataout, save(myfile) tex replace excel word dec(2)
* exporting any tab-delimited text file dataout using myfile.txt, word tex excel replace mid(2)
* exporting your outreg/outreg2 file sysuse auto, clear reg price rep head trunk outreg using myfile.out, replace reg price rep head turn gear outreg using myfile.out, append dataout using myfile.out, word tex excel replace mid(2)
Acknowledgements
The codes for word and tex are traced back to John Gallup's outreg through outreg2. excel is implemented as a facsimile of xmlsave.
Remarks
The decimal format is currently set as fc.
Author
Roy Wada roywada@hotmail.com