程序代码:
temp='员工信息表' cXLS=temp+".xls" DELETE FILE (cXLS) &&测试用 USE (temp) COPY TO (temp) TYPE xl5 OEXCEL = CREATEOBJECT('Excel.application') OEXCEL.WORKBOOKS.OPEN(SYS(5)+SYS(2003)+"\&cXLS") && 一定要加路径,否则会出错 oExcel.Sheets(temp).NAME = "Sheet1" && 此处一定要是工作表中显示的名称,也就是变量TEMP oExcel.ActiveWorkBook.Save OEXCEL.WORKBOOKS.CLOSE OEXCEL.QUIT RELEASE OEXCEL
坚守VFP最后的阵地