*! version 1.0.0 April 16, 2009 @ 18:22:04
help xmlappend

Title

xmlappend---Append a new sheet to an MS Excel XML file from a Stata data set

Syntax

xmlappend
[varlist]
[if] [in]
using
,
sheet(filename)

Description

xmlappend can put all or part of the dataset in memory onto an
MS Excel workbook as a new sheet. If the workbook doesn't exist,
xmlappend creates a new workbook.

Options

sheet is a required option which names the sheet.

Example(s)

Create a workbook, and then append a sheet to it.

. sysuse auto

. xmlappend using "splitauto.xml" if foreign, sheet(foreign)

. xmlappend using "splitauto.xml" if !foreign, sheet(domestic)

Notes

Unlike xmlsave, a varlist is not required. If no
varlist is given, all variables are exported.

xmlappend does not check to see if the given name for a sheet
already exists. This behavior might change in the future.

xmlappend will work only if it appends to workbooks created using
xmlsave or xmlappend. If you export a workbook from MS Excel,
and then use xmlappend to try to add pages, you will be disappointed.

This was put together rather quickly, and without a copy of MS Excel for
heavy duty testing. Please let me know if you experience any problems with it.

Also see

Manual: [D] xmlsave

Online: help for xmlsave

Author

Bill Rising, StataCorp

email: brising@stata.com

web: http://homepage.mac.com/brising