How to Concatenate Two Column Values in a CSV File

Posted By Posted by: EPM Partners on August 20, 2013

#Import the CSV file in the Variable and Select the column names that you want to be displayed into #updated CSV file

$CSV = import-csv “D:\CSV File\Temp.csv” | select Surname,Given_Names,Email_Address,Employee_ID,Employee_Number,User_Name,Position_Title,

@{n=’ResourceName’;e={$_.Surname + ” ” + $_.Given_Names}}

# script @{n=’ResourceName’;e={$_.Surname + ” ” + $_.Given_Names}} will create the new #column Resource name and concatenate the Surname and Given_Names Column Value

# Export the data from the Variable $CSV to the new file

$CSV | export-CSV “D:\Temp File\Temp1.csv”


Blog Posted In Blog Posted In: How to
Blog Posted In 

Leave a Reply

Your email address will not be published. Required fields are marked *