003 代码展示 # 初始化 require "win32ole" Pth=File.dirname(__FILE__) Eap=WIN32OLE::new("Excel.Application");...Eap.visible=true Ebk=Eap.workbooks.open(Pth+'/火影.xls') Wap=WIN32OLE::new("word.Application");Wap.visible
一下吧,分享一下成果,如果谁也遇到这个就别撞墙啦~~~~~ $KCODE = 'u' require 'find' class Auto_fix_mail_pros def runexcel #把win32ole...filepath=File.dirname('D:/excelrun/temp') filename=[] filenameid=0 require 'win32ole' require...filenameid+1 end end end if filenameid>0 for id in 0..filenameid-1 excel = WIN32OLE
003 代码展示 # 初始化 require "win32ole" Pth=File.dirname(__FILE__) Eap=WIN32OLE::new("Excel.Application")...Wap=WIN32OLE::new("word.Application");Wap.visible=true arr=Array.new(100){[nil]} filename=Dir.glob(Pth
1).Resize(150, 7).Value = Arr MsgBox "使用VBA用时:" & Timer - t & " 秒" End Sub 【Ruby】 require "win32ole..." # 初始化 Wap=WIN32OLE::new("word.Application");Wap.visible=true Pth=File.dirname(__FILE__) Wdc=Wap.documents.open...s5)==0 then arr[i][6] = Wdc.paragraphs(j).range.Text i=i+1 end } # 初始化 Eap=WIN32OLE
003 代码展示 require "win32ole" Pth=File.dirname(__FILE__) Wap=WIN32OLE::new("word.application");Wap.visible...=true Wdc=Wap.documents.open(Pth+"/汇总.doc") Pap=WIN32OLE::new("powerpoint.application");Pap.visible=
003 代码展示 require "win32ole" Pth=File.dirname(__FILE__) # 初始化 Eap=WIN32OLE::new("excel.application");Eap.visible...=true Ebk=Eap.workbooks.open(Pth+'/题库.xls') Pap=WIN32OLE::new("powerpoint.application");Pap.visible=
003 源码展示 require "win32ole" Pth=File.dirname(__FILE__) Eap=WIN32OLE::new("Excel.Application");Eap.visible...=true Ebk=Eap.workbooks.open(Pth+'/excel.xls') Wap=WIN32OLE::new("word.Application");Wap.visible=true
准备工作就绪,开始进行代码部分 env.rb文件编辑 导入dm.ll插件,添加触发截图方法; # encoding: UTF-8 require 'watir' require 'win32ole'
领取专属 10元无门槛券
手把手带您无忧上云