Excel_UDF Fehler

  • Hallo, bekomme immer folgenden Fehler:

    [autoit]

    O:\AutoScrIpTs\_Includes\Excel.au3 (439) : ==> The requested action with this object has failed.:
    $oExcel.Activesheet.Cells($sRangeOrRow, $iColumn).Value = $sValue
    $oExcel.Activesheet.Cells($sRangeOrRow, $iColumn).Value = $sValue^ ERROR

    [/autoit]

    Das Script sieht so aus:

    [autoit]

    #include<file.au3>
    #include<process.au3>
    #include<array.au3>
    #include<String.au3>
    #include"O:\AutoScrIpTs\_Includes\Excel.au3"

    [/autoit][autoit][/autoit][autoit]

    Dim $Array
    Dim $s
    $count = 700

    [/autoit][autoit][/autoit][autoit]

    $oExcel = _ExcelBookAttach(@ScriptDir & "\Dedusquotas.xls", "FilePath")
    If @error Then $oExcel = _ExcelBookOpen(@ScriptDir & "\Dedusquotas.xls", 1)

    [/autoit][autoit][/autoit][autoit]

    $SheetArray = _ExcelReadArray($oExcel, 1, 1, $count, 1, 1)
    For $i = $count To 0 Step -1
    If $SheetArray[$i] = "" Then
    _ArrayDelete($SheetArray, $i)
    Else
    ExitLoop
    EndIf
    Next
    $SheetArray[0] = UBound($SheetArray) - 1
    _ArrayDelete($SheetArray, $SheetArray[0])
    $SheetArray[0] = UBound($SheetArray) - 1

    [/autoit][autoit][/autoit][autoit]

    For $i = 2 To $SheetArray[0]
    _RunDOS('net localgroup DEDUSL-' & $SheetArray[$i] & 'A /domain > "' & @TempDir & '\DEDUSLTemp.txt"')
    $SB = _StringBetween(FileRead(@TempDir & '\DEDUSLTemp.txt'), "-------------------------------------------------------------------------------", "The command completed successfully.")
    If IsArray($SB) Then
    $SS = StringSplit($SB[0], @CRLF)
    If Not @error Then
    For $j = $SS[0] To 1 Step -1
    If $SS[$j] = "" Then _ArrayDelete($SS, $j)
    Next
    $SS[0] = UBound($SS) -1
    If $SS[0] > 1 Then
    $s = $SS[1] & "|"
    For $k = 2 To $SS[0]
    $s = $s & $SS[$k] & "|"
    Next
    ElseIf $SS[0] = 1 Then
    $s = $SS[1]
    Else
    $s = ""
    EndIf
    _ExcelWriteCell($oExcel, $s, $i, 5)
    EndIf
    EndIf
    Next

    [/autoit][autoit][/autoit][autoit]

    _ExcelBookSave($oExcel)
    ;_ExcelBookClose($oExcel)
    FileDelete(@TempDir & '\DEDUSLTemp.txt')

    [/autoit]

    Es sind ca. 680 Einträge, die bearbeitet werden sollen, bei ca. 150 kommt dann der Fehler.