Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Using Import-CSV to view a wide .CSV file

Aug
2,840
149
I wanted to view a .csv file that has 42 columns.

Using;

Code:
pshell /s "Import-Csv -Path .\holdings-report-2026-10-29.csv | format-table" | view

...displayed only the first 8 columns of the .csv file,
and the contents of column 8 were truncated.

The solution was to use the -property * argument of format-table,
that ensures every CSV column is included.

Out-String -Width 4096 gives the formatted text enough width to preserve every column.

This allows me to view all 42 columns,
with no truncation of column data.

Code:
pshell /s "Import-Csv -Path .\holdings-report-2026-10-29.csv  | format-table -property * | out-string -width 4096" | view

Ref: Import-Csv (Microsoft.PowerShell.Utility) - PowerShell

Joe
 
Back
Top