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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Convert text file to C...
Power Automate
Unanswered

Convert text file to CSV when a new file saved in file location

(0) ShareShare
ReportReport
Posted on by 2

Hi there

 

I'm a new bee and need help to automate .text file convert CSV or Excel file. I want to build a power automate flow when the file is saved in a specific location, parse the data and save as CSV/Excel. Attached is an example of a text file. I converted to .doc as I can't attach .txt file here.

 

Thanks in advance.

Categories:
I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @harignz 

     

    do you want to convert same as of the format file to csv format ?

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • harignz Profile Picture
    2 on at

    I want to remove unnecessary data such as (lines, space) and split by columns from Row 5

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @harignz 

     

    For that , first you have to create a cloud flow.

     

    1) Select the cloud flow type while creating new flow

    Nived_Nambiar_0-1697348430913.png

     

    I am selecting instant cloud flow for demo purposes.

     

    and the cloud flow should have components like this

    Nived_Nambiar_1-1697348517843.png

     

    First the flow should get content from a text file and then use that file content to create a csv file using Create file action.

     

    Hope this helps!

     

     

  • PeterFromDenver Profile Picture
    27 on at

    @harignz sis your original txt file using 1 line per item or do they wrap to the following line like your word document example. Also how big does your text file get?

  • philip_westover Profile Picture
    2 on at

    @PeterFromDenver I have the same issue @harignz so I can answer your questions.

     

    The text file is 1 line per item.  And in terms of size, there's ~ 250-500 lines per file.

     

    A couple of the key elements that need to be done are:

    --- Convert file from .txt to .csv

    --- The first row does not contain the headers.  As in @harignz's file, the headers are a few rows down... his headers are: St, Supp, Paper, Width, etc.

    --- The headers (and all other text) are not tab delimited.. there's just spacing in-between (some times 1 space, some times 5 spaces, etc.)

    --- Some rows need to be ignored.  For example, there's a few page title rows at the top.. and also rows with dashed lines (------------), and also some 'total' rows (e.g. rows that contain 'Width Totals', 'Avg_days_in_stock', etc.)

     

    So what we'd be looking for in the final .csv would be something like the below.  The first line has the headers and next row is the data.

    St      Supp        Paper       Width           Order      etc.

    41     PMTES     100M        1900          230204      etc.

     

    Thanks. --- Philip

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 791

#2
Valantis Profile Picture

Valantis 582

#3
Haque Profile Picture

Haque 529

Last 30 days Overall leaderboard