Skip to main content

Notifications

Power Automate - Building Flows
Suggested answer

Unneeded line breaks when copying text into excel

Posted on 24 Nov 2024 22:31:53 by 66
Hi, 
 
I need to know how to stop line breaks being added when I copy text from an email into excel? 
 
I've got this function triming the text I want from the email: 
trim(first(split(last(split(trim(outputs('Html_to_text')?['body']), 'Report summary:')), 'Outcome:')))
 
When it enters into excel it creates random line breaks in to text:
 
I've blurred the actual text because it contained sensitive information but the cell on the top is where I've copied and pasted the text from the email manually and the one on the bottom was done using the formula above in power automate. I need it to stop adding those extra line breaks if possible. Any advice?
 
Thank you,
Lauren
  • LB-20090315-0 Profile Picture
    LB-20090315-0 66 on 26 Nov 2024 at 00:05:52
    Unneeded line breaks when copying text into excel
    Thank youuartimin andtrice602. I appreciate the suggestions. Sad to report neither attempts at using the replace function have successfully stopped the extra line breaks. I'm sure that's the way to go, I probably just need different inputs. 
     
    If anyone has any other ideas I could try please let me know! I'll be happy to experiment until I get this. 
     
    Many Thanks,
    Lauren
  • uartimin Profile Picture
    uartimin 2 on 25 Nov 2024 at 04:24:05
    Unneeded line breaks when copying text into excel
    If you use "Convert HTML to Text" to remove the HTML tags, sometimes it will break it into several lines. It is difficult to remove HTML tags while keeping the original text format.
     
    See known issues and limitations.
     
    You can add a compose action to replace the "\n" with spacing. 
  • Suggested answer
    trice602 Profile Picture
    trice602 10,944 on 24 Nov 2024 at 22:44:26
    Unneeded line breaks when copying text into excel
    Hi,
     
    One this you try after this expression is to replace '\n' with ''.
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     


     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,246

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,884

Leaderboard