I have this csv file I\'m trying to remove leading zeros from, but with my code for any numbers that have letters or special characters, it nulls out the value, and I don\'t wan
Try using ".TrimStart()" to take out the zeros.
Import-CSV "C:\path\test.csv" | ForEach-Object{
$_.column1 = ($_.column1).TrimStart('0')
$_
} | Export-Csv "C:\path\test2.csv" -NoTypeInformation
Move-Item "C:\path\test2.csv" "C:\path\test.csv" -Force
Note that in order for this to work, I had to reformat your first column to take out the extra spaces. Thus, the header in the original csv would start with: column1,column2, and so on.