#include <Excel.au3>
#include <Array.au3>

$sInputFile = @scriptdir & "\input.xls"
$sExportFile = @scriptdir & "\export.xls"
Local $oExcel = _Excel_Open()
Local $workbook = _Excel_BookOpen($oExcel, $sInputFile)
Sleep(2000) ;Pause to let user view action

$Zeilenanzahl = $oExcel.ActiveSheet.Cells($oExcel.Rows.Count, 1).End(-4162).Row ; -4162 = xlUp
For $i = 3 to $Zeilenanzahl
		$test = $oExcel.ActiveSheet.Range("F"& $i).Value
		If StringLen($test) > 9 Then

			_Excel_RangeDelete($workbook.Worksheets(1), '"' & $i & ":" & $i & '"')
			If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeDelete Example 2", "Error deleting rows." & @CRLF & "@error = " & @error & ", @extended = " & @extended)

			Consolewrite($test & @TAB & '"' & $i & ":" & $i & '"' & @CRLF)
		EndIf
Next



;~ $oExcel.ActiveWorkbook.SaveAs($sExportFile)
;~ $oExcel.Workbooks.Close
;~ sleep(200)
;~ 	$oExcel.Quit
;~ $workbook.Worksheets(1)("A2:I2").Interior.Color = 0x00FFFF

;~ _Excel_BookSaveAs($workbook, $sExportFile, $xlExcel8, True)
;~ _Excel_BookClose($oExcel)
