Using WIN32OLE with Excel

2019-06-19 20:04栏目:技术创新
TAG:

require 'win32ole'

excelobj = WIN32OLE.new('excel.application')

excelobj['Visible']=TRUE
excelobj.workbooks.add()

excelobj.Range('a6')['Value'] = 100

excelobj.Range('a1')['Value'] = 100
excelobj.Range('a2')['Value'] = 200
excelobj.Range('a3')['Value'] = 300
excelobj.Range('a4')['Value'] = 400
excelobj.Range('a1:a4').select()

版权声明:本文由新浦京娱乐站_新浦京娱乐场官网_新浦京娱乐发布于技术创新,转载请注明出处:Using WIN32OLE with Excel