Hi all,
da ich hier sowie in Google nichts gefunden hab, hab ich mir selbst was kleines gebastelt
Man kann mit _ExcelColMove() Spalten verschieben und mit _ExcelColNum() Spaltennummern auslesen.
Lässt sich auch wunderbar kombinieren, z.b.:
[autoit]_ExcelColMove($ofile,_ExcelColNum("AF"),_ExcelColNum("A"))
[/autoit]
------
Func _ExcelColMove($ofile, $from, $to)
$ary = _ExcelReadSheetToArray($ofile,1,$from,0,1)
_ExcelColumnDelete($ofile,$from)
_ExcelColumnInsert($ofile,$to)
for $i = 1 to ubound($ary)-1
_ExcelWriteCell($ofile,$ary[$i][1],$i,$to)
Next
$ary = ""
EndFunc
Func _ExcelColNum($num)
if isint($num) Then
return $num
Else
$cnt = StringLen($num)
$plus = 0
$num = StringUpper($num)
if $cnt = 2 Then $plus = (asc(stringleft($num,1))-64) * 26
$str = asc(StringRight($num,1)) -64
$num = $str + $plus
EndIf
return $num
EndFunc
P.S.: Mag sein, dass es das schon gibt, mag auch sein, dass man "sinnvollere Variablennamen" verwenden kann/soll/muss. Für meine Zwecke funktionierts tadellos und ich dachte, ich teils mal mit euch (Vielleicht hat der ein oder andere ein ähnliches Problem).
Grüße
x0r