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 / Issue in writing text ...
Power Automate
Answered

Issue in writing text to file

(0) ShareShare
ReportReport
Posted on by 39

I am trying to create audit logs for my workflows and I am using 'Write Text to File' action as I wish to create audits on the basis of the day the workflow is executed. Here's an image for reference:

 

aSagCoder_0-1705567664995.png

But after the flow has been run, I try to access my audit files in Excel, but I keep encountering this issue - wherein the data I wish to append - comes in different rows. Like here: 

aSagCoder_1-1705568077610.png

I want the ERROR and the error message with line number to be appended to 4th row, instead of the 5th. Is there a possible solution for this issue? Should I use Write to Excel action instead? Or will I have to scrap the entire thing and start over?

I have the same question (0)
  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    If you want to read those logs via Excel, you should use a different action to write it, such as Launch Excel Write to Excel worksheetClose Excel for Excel files, or Write to CSV file to write to a CSV file.

     

    Write text to file is used for plain text files and it won't give you proper formatting for opening the file via Excel. You should simply read these files via a text editor, such as Notepad, Notepad++ or VSCode.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 468

#2
Haque Profile Picture

Haque 370

#3
Valantis Profile Picture

Valantis 354

Last 30 days Overall leaderboard