Results 1 to 2 of 2

Thread: Import Converter deletes line feeds automatically

  1. #1
    Acolyte pinarello's Avatar
    Join Date
    Jun 2019
    Location
    Germany
    Posts
    60
    Articles
    0
    Excel Version
    Office 365

    Import Converter deletes line feeds automatically



    Register for a FREE account, and/
    or Log in to avoid these ads!

    After loading a website with Power Query I would have to notice that the import converter deleted line feeds (lf - Chr 10) during loading. This leads to the fact that I have no more possibility to split the text in the corresponding columns correctly.

    However, when I copy individual web pages to the clipboard and paste them into Excel's formula row, I then see (line 33) the line break and can replace it (line 35).

    I have documented an example in the enclosed Excel folder.

    Is there a way to solve this problem ???

  2. #2
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,412
    Articles
    44
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    I'll be honest, the only way I know to get around this is very ugly... it's to import the page as a text file instead of html, and do all of the parsing manually. Nasty, nasty business. If you want to do that, you'd just need to go to your source step, click the gear icon, and then change the "Open file as" to Text File.

    After that though... then the fun begins. You'd probably want to:
    • Add a custom column to say if [Column1] = "<!-- show threads -->" then "remove"
    • Fill the new column up
    • Remove all rows that have "remove" in that column
    • Then you're going to be doing a lot of splitting data and logic tests to be working out what data you need


    It won't be fun, but it should preserve all of the characters you need...
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •