Tab delimited file not displaying correctly as table

I have a tab delimited file that I’m simply trying to display as a table in PowerShell. For some reason it’s combining everything on each row into the first column rather than separating on the tab as it should. The PowerShell code is as follows…

$data = Import-Csv -Delimiter `t -Path C:\temp\testimport.txt

$data | Format-Table

Looking at the file in Notepad++ shows a CR/LF at the end of every line and a tab separating all of the values. The only oddity being that some rows don’t have a value for every single column. The file looks like the following…

column1 column2 column3 column4 column5
1 2 3 4 5
2 5 4 6
4 4 6 4
4 5 6 4 6

Any help on how to get this to display properly would be appreciated, thanks.

Are you sure you have tabs separating the headers and number values?

This is what I get with the code below. It is not obvious from the copy/paste, but each number is aligned with its corresponding column

$data = Import-Csv -Delimitert -Path c:\temp\testimport.txt`
$data | FT

column1 column2 column3 column4 column5
------- ------- ------- ------- -------
1 2 3 4 5 
2 5 4 6 
4 4 6 4 
4 5 6 4 6

Yep… I’m an idiot… After reviewing it in Notepad++ it appears it was spaces and not tabs. Thanks though, works fine now.