Forum Discussion

skai's avatar
skai
Frequent Visitor
2 years ago

Trouble with creating columns from text file using delimeter (|)

I am trying to create dataflows from text files generated from SAP, each column is split by |. I have tried importing the data and spliting by delimter based on first 200 rows however some rows do not split correctly and merge with others. I have also tried importing as a single column and then insertin step to split however same issue. Any advice would be welcome, some of these files have 50000 

power query

 

text file

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi skai 

     

    Can you please provide some dummy data or dummy data file that can reproduce this behavior? We need the data for testing. 

     

    Besides, from the screenshot of the text file, it seems the columns are aligned vertically. Is it possible to split the column by fixed width?

     

    Or you may try replacing QuoteStyle.Csv with QuoteStyle.None when splitting a column?

    Splitter.SplitTextByDelimiter("|", QuoteStyle.None)

     

    Best Regards,
    Jing
    If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!