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 / Excel.WriteToExcelError
Power Automate
Answered

Excel.WriteToExcelError

(0) ShareShare
ReportReport
Posted on by

Hi folks,

 

I am facing the below error. I am trying to run the desktop flows using un-attended mode. I am not able to get this error. Could any one please help to understand the error and resolution on it.

 

Abhishek_B_0-1711973735478.png

 

I have the same question (0)
  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @Abhishek_B 

     

    Is this flow working fine on attended mode? Have you tested it? If possible please share screenshot of your desktop flow where I want to check how you have framed the logic to write cell action.

     

    And also please share full screenshot of your error.

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀. If you'd like to appreciate me, please write a LinkedIn recommendation 🙏

  • Abhishek_B Profile Picture
    on at
        "body": {

            "error": {

                "code""Excel.WriteToExcelError",

                "message""Problem while executing action 'WriteCell'. Failed to write into Excel. \r\n \r\nMicrosoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.ActionException: Failed to write into Excel. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC\r\n   --- End of inner exception stack trace ---\r\n   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)\r\n   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)\r\n   at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)\r\n   at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.ExcelActions.GetProperty(Object o, String propertyName, Object[] arguments)\r\n   at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.ExcelActions.WriteToExcel(Variant excelInstance, Variant startCol, Variant startRow, Variant valueToWrite, Int32 writeMode, String cellName)\r\n   --- End of inner exception stack trace ---\r\n   at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.WriteToExcel.Execute(ActionContext context)\r\n   at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)\r\n"

            }
     
    Is this flow working fine on attended mode? - Yes, It is running without any error. 
    About workflow:
    1. Email Auto trigger Excel Attachment
    2. Save the excel to particular location
    3. Run the desktop flow in un-attended mode (sign out)
    4. In desktop flow 1st we execute the python code for ETL process.
    5. Creates the transformed file in particular location
     
    After this actions the flow is failing. Please find the error details above. 
  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @Abhishek_B 

    Have you considered adding a log file before writing to Excel to verify if the Python output contains the expected values?

     

    Additionally, it would be beneficial to implement validation checks and incorporate delay or wait actions as needed. Sharing screenshots of your flow would provide deeper insight into your logic, enabling me to offer more appropriate suggestions regarding any issues you encounter.

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀. If you'd like to appreciate me, please write a LinkedIn recommendation 🙏

  • Abhishek_B Profile Picture
    on at

    The ETL file is getting executed successfully. We are getting the transformed file. All these steps are executed through PAD flow, and during this set of actions, we are not writing into Excel. 

  • Abhishek_B Profile Picture
    on at

    Priorly we were facing an unhandled error. So we installed the past PAD version (2.39) where we tested the flow in attended mode. Currently, we have allocated the unattended license on the registered Machine could this be causing errors?

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @Abhishek_B 

    Without reviewing your flow code, I'm unable to provide specific suggestions at this time.

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @Abhishek_B 

    Simply allocating an unattended license typically wouldn't cause any issues or reported issues.

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Where is your file stored? If the target file is stored in a network location, such as on SharePoint or OneDrive and you're using a local app to sync it to a local directory, this can cause errors when writing to a file. I would recommend storing it locally on the machine while writing and then moving it where necessary.

     

    If the location is not the cause, then it might be related to the value you are writing or the cell you are targeting. Can you provide screenshots of the flow and the action that fails?

  • Abhishek_B Profile Picture
    on at

    Hi @Agnius ,

     

    I am storing the file on the local system using the file system action - Create File. About sharing the flow actions, I am afraid that the flow has deployed on the client side and we might be not allowed to share the internal snapshot.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    What exactly are you writing to it? Is it a single value, a formula, a table, a list or what? Can you share the specific value?

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 253 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 172 Super User 2026 Season 2

#3
trice602 Profile Picture

trice602 134 Super User 2026 Season 2

Last 30 days Overall leaderboard