'Create Graph in Excel using VBScript
dim xl,wb
set xl=createobject("Excel.Application")
xl.Visible = true
set wb = xl.workbooks.add
dim arr(19,9)
for i = 1 to 20
for j = 1 to 10
arr(i-1,j-1) = i*j
next
next
dim rng
set rng = wb.Activesheet.Range("A1").Resize(20,10)
rng.value = arr
wb.Charts.Add
wb.ActiveChart.ChartType =66
wb.ActiveChart.SetSourceData rng, 2
wb.ActiveChart.Location 2, "Sheet1"
dim xl,wb
set xl=createobject("Excel.Application")
xl.Visible = true
set wb = xl.workbooks.add
dim arr(19,9)
for i = 1 to 20
for j = 1 to 10
arr(i-1,j-1) = i*j
next
next
dim rng
set rng = wb.Activesheet.Range("A1").Resize(20,10)
rng.value = arr
wb.Charts.Add
wb.ActiveChart.ChartType =66
wb.ActiveChart.SetSourceData rng, 2
wb.ActiveChart.Location 2, "Sheet1"
Comments
Post a Comment