Formating column size in Excel with using Export-CSV

Welcome Forums General PowerShell Q&A Formating column size in Excel with using Export-CSV

This topic contains 2 replies, has 3 voices, and was last updated by

 
Participant
1 year, 1 month ago.

  • Author
    Posts
  • #82231

    Participant
    Points: 0
    Rank: Member

    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

  • #82234

    Keymaster
    Points: 1,638
    Helping HandTeam Member
    Rank: Community Hero

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

  • #82244

    Participant
    Points: 14
    Rank: Member

    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/

The topic ‘Formating column size in Excel with using Export-CSV’ is closed to new replies.