主题:用VFP控制EXCEL多次复制粘贴问题
朋友们,帮我解决下,用VFP控制EXCEL多次复制粘贴时,都会出现下图的提示框,能不能不出现这框?我写的代码是:
myExcel1=CreateObject("Excel.Application")
myExcel1.workbooks.open("e:\wems\data\wems1.xls")
myExcel1.worksheets('wems1').activate
myExcel1.Range('a1:bz3000').copy
myExcel1.quit
myExcel=CreateObject("Excel.Application")
myExcel.workbooks.open("e:\wems\总表.xls")
myExcel.worksheets('分表1').activate
myExcel.ActiveSheet.Paste
myExcel.activeworkbook.save()
myExcel.quit
release myExcel1
release myExcel
***********
myExcel1=CreateObject("Excel.Application")
myExcel1.workbooks.open("e:\wems\data\wems1a.xls")
myExcel1.worksheets('wems1a').activate
myExcel1.Range('a1:bz3000').copy
myExcel1.quit
myExcel=CreateObject("Excel.Application")
myExcel.workbooks.open("e:\wems\总表.xls")
myExcel.worksheets('分表2').activate
myExcel.ActiveSheet.Paste
myExcel.activeworkbook.save()
myExcel.quit
release myExcel1
release myExcel
***********
myExcel1=CreateObject("Excel.Application")
myExcel1.workbooks.open("e:\wems\data\wems1.xls")
myExcel1.worksheets('wems1').activate
myExcel1.Range('a1:bz3000').copy
myExcel1.quit
myExcel=CreateObject("Excel.Application")
myExcel.workbooks.open("e:\wems\总表.xls")
myExcel.worksheets('分表1').activate
myExcel.ActiveSheet.Paste
myExcel.activeworkbook.save()
myExcel.quit
release myExcel1
release myExcel
***********
myExcel1=CreateObject("Excel.Application")
myExcel1.workbooks.open("e:\wems\data\wems1a.xls")
myExcel1.worksheets('wems1a').activate
myExcel1.Range('a1:bz3000').copy
myExcel1.quit
myExcel=CreateObject("Excel.Application")
myExcel.workbooks.open("e:\wems\总表.xls")
myExcel.worksheets('分表2').activate
myExcel.ActiveSheet.Paste
myExcel.activeworkbook.save()
myExcel.quit
release myExcel1
release myExcel
***********