import com
excel = com.CreateObject("Excel.Application")
var book  = excel.Workbooks.Add()
var sheet = book.Worksheets(1)
excel.Visible = true
 
for row=1;30 begin
  sheet.Cells(row, 1).Value2 = math.floor(math.random(1*19) * 100)
end
 
var chart = excel.Charts.Add()
chart.ChartType = 4 //xlLine
var range = sheet.Range("A1:A30")
chart.SetSourceData(range)