USE 表名
SUM yw to x
*写入Excel文档
eole=CREATEOBJECT("excel.application")
eole.Workbooks.add
&&新建文档
*eole.Workbooks.Open(GETFILE("xls"))
&&打开已有文档
eole.Range("A1:A1").FormulaR1C1 = x
eole.ActiveWorkbook.close(.t.)
*写入Word文档
ow=CREATEOBJECT("WORD.APPLICATION")
ow.Documents.add()
&&新建文档
*ow.Documents.Open(GETFILE())&&打开已有文档
ow.Selection.Text=x
ow.ActiveDocument.Save
ow.Quit