Author Posts

October 16, 2017 at 6:56 pm

I was thinking this would be simple but I cannot find anything on how to set the size of a column with the Export-CSV

Can I set column size using Export-Csv? There does not seem to be a property for this and this seems like something that you would want to be able to do.

Thank you

October 16, 2017 at 6:57 pm

You don't actually set column sizes in a CSV. The CSV format doesn't "retain" sizing – columns aren't fixed-length in CSV.

October 16, 2017 at 7:45 pm

you can use the importexcel module to get some of this functionality and export to excel spreadsheets.

https://blogs.technet.microsoft.com/heyscriptingguy/2015/11/25/introducing-the-powershell-excel-module-2/