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 / MS Flow fails at end o...
Power Automate
Answered

MS Flow fails at end of textfile

(0) ShareShare
ReportReport
Posted on by 19

I have a flow that reads a tab delimited text file and writes data to an online Excel spreadsheet.  It reads all of the rows but then fails after the last row.  The tab delimiter, newline character, and an array for each data row are initialized.

 

The text file has headers.  Each data row contains tabs and ends with the return character.  The array value is set as follows:

skip(split(body('Get_file_content_using_paht'),variables('CarriageReturn')),1)

 

In the apply to each routine, the variable that splits the data into columns is set as follows:

split(items('apply_to_each_-_data_rows'),variables('TabDelimit'))

 

ISSUE: The return character at the end of each row is being included in the last column's value. This is not desired but I can live with this since the data in inserted into the online spreadsheet as expected.  However, the flow rails after the last row is processed.  It does not recognize when it's reached the end of the file.

 

How can I get flow know when it's reached the end of the text file.  Please advise.

 

Thanks,

ARobinson15

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @arobinson15 

     

    Before your process each line check the length is greater than zero.

     

    Thanks

  • v-litu-msft Profile Picture
    on at

    Hi @arobinson15,

     

    Could you please provide an instance of the entity need to processed?

     

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

  • Verified answer
    arobinson15 Profile Picture
    19 on at

    Thanks for your recommendation.  It helped me learn a about another Flow function. However, LENGTH did not work in this case.  

     

    I did get the flow to end successfully by adding a COMPOSE action.

     

    Thanks again.

    ARobinson15

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard