VBScript:写excel的例子
写excel demo:
Set app = wscript.createobject("Excel.application")
app.visible=True
Set workbook = app.workbooks.add
Set sheet = workbook.worksheets(1)
For row = 1 To 10
For col = 1 To 5
sheet.cells(row, col).value = rnd()
Next
Next
Set sheet = workbook.worksheets(3)
sheet.range("A1:e10").formula = "=Sheet1!a1"