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()