我從時間表系統按照以下格式的CSV導出文件:PowerShell的數組操作
Paynum,Employee,Date,Time 123,Joe Blogs,2016-07-10,08:37:29 321,Ivor Notion,2016-07-10,08:39:31 345,Herr Flick,2016-07-10,08:44:05 321,Ivor Notion,2016-07-10,12:23:07 345,Herr Flick,2016-07-10,12:24:15 123,Joe Blogs,2016-07-10,13:03:49
我想要達到的輸出是:
Paynum,Employee,Date,Time#1,Time#2 123,Joe Blogs,2016-07-10,08:37:29,13:03:49 321,Ivor Notion,2016-07-10,08:39:31,12:23:07 345,Herr Flick,2016-07-10,08:44:05,12:24:15
我已經加載樣品有:
$TimesheetData = @(Import-Csv $MergerFile)
但現在我完全失去了for
循環。
你能後的for循環? – Richard
我有一個foreach循環,但完全從那裏失去了陰謀。的foreach($在$ TimesheetData行){ \t $ row.Paynum \t $ row.Employee \t $ row.Date \t $ row.Time } – Dogeron