Hallo,
ich arbeite leider nur ganz selten mit der Powershell und bräuchte mal eure Hilfe.
Und zwar habe ich folgendes Script ...
$excel = New-Object -ComObject Excel.Application
$excel.visible = $True
$workbook = $excel.Workbooks.add()
$sheet = $workbook.worksheets.Item(1)
$path = "C:\Log\TP010\all1404.txt"
$input = Get-Content $path
foreach ($temp in $input)
{
$Inhalttrennen = $temp.Split("=")
$Tx = $Inhalttrennen[2]
$Rx = $Inhalttrennen[3]
$Ausgabe = "$($Tx) $($Rx)"
$Ausgabe >> C:\Log\TP010\split1.txt
}
$path = "C:\Log\TP010\split1.txt"
$input = Get-Content $path
foreach ($temp in $input)
{
$Inhalttrennen = $temp.Split(" ")
$Tx = $Inhalttrennen[-5]
$Rx = $Inhalttrennen[3]
$sheet.cells.item(1,1) = "$Tx"
$sheet.cells.item(1,2) = "$Rx"
}
Wie bekomme ich es hin, dass jeweils der nächste Wert von $Tx in 2,1 geschrieben wird bzw der nächste $Rx Wert in 2,2.
Wäre schön wenn mir einer helfen könnte.
Mit freundlichen Grüßen
MBudde