web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Line feeds not splitti...
Power Automate
Answered

Line feeds not splitting correctly

(0) ShareShare
ReportReport
Posted on by 90

Hi,

 

Further to my previous post regarding importing a text file that has been converted from a csv file, microsoft sees the end of lines as '\r\n' but it I try to split on this, the split fails.

 

If I create a variable that just has the enter key entered to get the carriage return, the split then only works on \n part and thus leaves \r in the line when it is returned

how can i get flow to see the \r\n as the end of line properly

 

 

Categories:
I have the same question (0)
  • v-alzhan-msft Profile Picture
    on at

    Hi @mmorley ,

     

    Could you share the link of the previous post?

    Could you please explain more details about the csv file and the requirement so we could better understand your requirement and provide the proper workaround.

     

    Best regards,

    Alice   

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Verified answer
    mmorley Profile Picture
    90 on at

    Hi @v-alzhan-msft 

     

    The other thread was https://powerusers.microsoft.com/t5/Building-Flows/Help-needed-for-reading-text-file-and-adding-each-line-into/m-p/552493#M71991

     

    We have a excel csv file sent to us on regular basis, we need to import this into a sharepoint list, so the process i follow is

     

    Get attachment from email if csv file

    save csv file as txt file (flow just sees a stream otherwise and not the the actual text)

    read txt file and process each line

    add contents to list

     

    after some trials I have got it working by using the following to split each line correctly to get rid of '\r\n

     

    split(uricomponenttostring(replace(uricomponent(variables('CSVDATA')),'%0D%0A','*','*')

     

    the solution provided my @DeepakS was perfect and the simplest method going to get the data into a list, just had to make the slight change to the split by adding the '%0D'

  • v-alzhan-msft Profile Picture
    on at

    Hi @mmorley ,

     

    So does your problem solved now?

     

    Best Regards,

    Alice

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard