Forum Discussion

juan jimenez's avatar
juan jimenez
Iron Contributor
Sep 12, 2023
Solved

Power query with txt for messages

hi,

 

I would like to import the messages from conversations that I receive in txt format via Power Query. I have uploaded the "txt" here as a "docx" because this platform does not accept txt files!!.

 

Unfortunately, there are errors because sometimes the message lines are cut in 2 lines, and the cut part is considered an error.

 

1. Is there a way to concatenate the messages so that the cut phrases are not lost?

 

2. Could someone continue the code so that new files placed in the source folder are added to the spreadsheet without deleting the previous ones?

 

Thank you very much, Juan

12 Replies

  • juan jimenez 

    1) Could you please clarify what is desired result for such blocks (if source is recognized correctly)

    Where marked texts shall be or they shall be removed?

     

    2) If you use From Folder connections files are appended, nothing is removed.

    • juan jimenez's avatar
      juan jimenez
      Iron Contributor
      hi Sergei,

      1) The lines marked in red should go with the text from the immediately preceding line that starts with a date. They are part of the text of the message corresponding to that day and time.

      Can this operation be done with Power Query? Can you help?

      Thank you very much, juan
      • SergeiBaklan's avatar
        SergeiBaklan
        MVP

        juan jimenez 

        Okay, but it's better to know how above texts are separated in csv. Is that crlf, or lf or what. If you can't share .txt here perhaps you could share the source on OneDrive or like and share the link make it available for everyone.

Resources