回复 12楼 schtg
ASTACKINFO(a程序)
cPath = ADDBS(JUSTPATH(a程序[2]))
SET DEFAULT TO (cPath)
SET SAFETY OFF
COPY FILE a123.xls TO cPath+"b123.xls"
oExcel = CREATEOBJECT("Excel.Application")
oExcel.DisplayAlerts = .F.
oExcel.WorkBooks.Open(cPath+"b123.xls")
USE a123
nColCount = FCOUNT()
SCAN
FOR nCol=1 TO nColCount
oExcel.Cells[RECNO()+1,nCol].Value = EVALUATE(FIELD(nCol))
ENDFOR
ENDSCAN
IF MESSAGEBOX("完成,数据转换。要导出EXCEL吗?.",1+256,'提示')=6
eole=creatobject("excel.appltcation")
oExcel.Workbooks.Open(cPath+"b123.xls")
&& 打开指定工作簿
oExcel.Visible=.T.
ELSE
RETURN
ENDIF
oExcel.Workbooks.Close
oExcel.Quit
Release oExcel &&只有释放对象变量, EXCEL进程才会完全关闭
加了之后并没有在窗口中看到EXCEL 表