1 dim xls ,i,j 2 set xls = createObject("excel.application") 3 xls.visible = true 4 xls.caption = "测试" 5 xls.workbooks.add 6 for i = 1 to 9 7 for j = 1 to i 8 xls.cells(i,j).value =j &"×"&i &"="& j*i 9 next 10 11 next 12 set xls = nothing