powershell - Import-csv Target cell on Csv -
i have csv list of usernames
i want import 1 cell of csv file e.g. a2
is possible specific? have tried googling don't see exact solution. tried powershell also.
can done ?
thanks
confuseis
the below example select , output 'cell' a2 test.csv
in example, column header row 'username'
$infile = import-csv c:\temp\test.csv $targetcell = $infile.username[1] write-output $targetcell
this snippet doing following:
- import csv file, yielding powershell object.
- select column want work with, items column can treated array. select desired item in column referring it's 0 based index value.
- output results.
Comments
Post a Comment