Import-Csv 的基本用法
給出以下 CSV 檔案
String,DateTime,Integer
First,2016-12-01T12:00:00,30
Second,2015-12-01T12:00:00,20
Third,2015-12-01T12:00:00,20
可以使用 Import-Csv
命令在 PowerShell 物件中匯入 CSV 行
> $listOfRows = Import-Csv .\example.csv
> $listOfRows
String DateTime Integer
------ -------- -------
First 2016-12-01T12:00:00 30
Second 2015-11-03T13:00:00 20
Third 2015-12-05T14:00:00 20
> Write-Host $row[0].String1
Third