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 / 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

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