#include <array.au3>
$o_Excel=ObjCreate("excel.application")
$o_Excel.visible=False
$Workbook=$o_Excel.workbooks.open(@ScriptDir&"\学生成绩表.xls")
with $Workbook.worksheets("Sheet1").cells(1,$Workbook.worksheets("Sheet1").columns.count).end(1)
.offset(0,1)="平均分"
.offset(1,1).resize(.parent.cells(.parent.rows.count,1).end(3).row-1,1).formular1c1="=Text(SUM(RC3:RC"&.column&")/COUNT(RC3:RC"&.column&"),""0.0"")"
.offset(0,2)="总分"
.offset(1,2).resize(.parent.cells(.parent.rows.count,1).end(3).row-1,1).formular1c1="=SUM(RC3:RC"&.column&")"
$a_Arr=.parent.range("a1").currentregion.value
EndWith
$Workbook.close(False)
$o_Excel.quit
_ArrayDisplay($a_Arr)
利用Excel处理完成后再读入数组的 |