AutoIT: 如何從excel中取值並判斷條件?

#include <Excel.au3>
$excel = _ExcelBookAttach("Book1.xlsx" ,"FileName")
Dim $i = 1

;_ExcelReadCell($excel,"b"&$i) <>"" 並不等於 not(_ExcelReadCell($excel,"b"&$i) ==""),使用的時候儘可能使用後者
While IsInt(_ExcelReadCell($excel,"b"&$i))
 $ten = _ExcelReadCell($excel,"b"&$i)
 if $ten == 0 Then
 _ExcelWriteCell($excel, $ten, "d"&$i)
 ElseIf $ten == 1 Then
 _ExcelWriteCell($excel, $ten, "e"&$i)
 Else
 _ExcelWriteCell($excel, $ten, "f"&$i)
 EndIf
 $i += 1
WEnd
相關文章
相關標籤/搜索