乔山办公网我们一直在努力
您的位置:乔山办公网 > excel表格制作 > -qtp excel,qtp怎么使用

-qtp excel,qtp怎么使用

作者:乔山办公网日期:

返回目录:excel表格制作







On error resume next
'读取excel数据
'创建excel对象
Set oe=CreateObject("excel.application")
'excel可见模式
'oe.Visible=true
'打开资源并将内容复制到新工作簿中后关闭源文档
Set oss=oe.workbooks.open(testpath & filename & ".xls")
Set os=oe.Workbooks.Add
oss.Worksheets(1).cells.copy
os.Worksheets(1).range("a1").PasteSpecial
oss.Worksheets(1).range("a1").copy
oss.Close
Set oss=nothing

这段代码是创建一个新的excel并将制定excel文档的内容复制到新excel中。 其中Set os=oe.Workbooks.Add就是创建新的excel文档

相关阅读

  • -qtp excel,qtp怎么使用

  • 乔山办公网excel表格制作
  • On error resume next读取excel数据创建来excel对象Set oe=CreateObject("excel.application")excel可见模式oe.Visible=true打开资源并将内源容复制到百新工作簿中后关闭源文档度Set oss=oe.workbooks.o
关键词不能为空
极力推荐

ppt怎么做_excel表格制作_office365_word文档_365办公网