Forum

DataFormat.Error: T...
 
Notifications
Clear all

DataFormat.Error: There were more columns

6 Posts
3 Users
0 Reactions
932 Views
(@cqs2016)
Posts: 12
Active Member
Topic starter
 

Good Morning,

I have tried to Merge a connection query that comes from txt format with an Excel format and continue to get this error when I try to expand the data. Can you see the screen shot ok? Thanks for your help.DataFormat.Error_.gif

 
Posted : 16/11/2016 9:10 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Vanessa,

I suspect the problem lies in the different file formats being merged. Please check that the line containing Csv.Document specifies the delimiter type e.g.:

Csv.Document(File.Contents("C:filepathfilename.txt"),[Delimiter=",",Encoding=1252])

 

If that's not the problem then I'll need to sample files so I can replicate the problem.

Mynda

P.S. the gif image was very difficult to read. Next time maybe try a .png or .jpg

 
Posted : 16/11/2016 8:38 pm
(@cqs2016)
Posts: 12
Active Member
Topic starter
 

Hello Mynda,

I have numbers on a sheet that I am trying to search from in a group of TXT files that are pipe delimited. I have a connection only to the txt files. Once I create a custom column (using =Csv.Document([Content]) I then Insert a split column by delimiter. I still get the error message when I expand table in new column.

 
Posted : 14/01/2017 1:25 pm
(@catalinb)
Posts: 1937
Member Admin
 

Hi Vanessa,

Csv.Document([Content]) will automatically split by comma, most probably in the expand table dialog window you see more than 1 column.

Add a column with this formula instead:

 =  Table.FromColumns({Lines.FromBinary(File.Contents([Folder Path]&[Name]))

Should work better than Csv.Document, when you expand the table, you should have only one column, that you can split by pipe delimiter.

 
Posted : 15/01/2017 1:50 am
(@cqs2016)
Posts: 12
Active Member
Topic starter
 

Now I get an error regarding the RightBrace. It seems to be missing and I am not sure where to place it. thanks Catalin

1-19-2017-10-16-16-AM.jpg

 
Posted : 20/01/2017 12:18 pm
(@catalinb)
Posts: 1937
Member Admin
 

It should be before the last round paranthesis: (it should end with 2 round paranthesis, 1 curly bracket, and another round paranthesis)

Table.FromColumns({Lines.FromBinary(File.Contents([Folder Path]&[Name]))})

 
Posted : 20/01/2017 12:29 pm
Share: