Excel Performance Problems

Fix Power Automate Desktop Excel Write Failed with OutOfMemoryException

Kushani NimanthikaKushani Nimanthika Oct 19, 2026 869 views

Question details

The user needs to resolve an OutOfMemoryException that occurs when writing a large data table parsed from JSON into Excel via Power Automate Desktop.

How to Fix Power Automate Desktop Excel Write OutOfMemoryException
Product
Power Automate Desktop / Microsoft Excel
Device & OS
not provided
Scenario
Automating the extraction of JSON data and writing the resulting data table into an Excel spreadsheet using a desktop flow.
Observed behavior
The flow successfully parses the JSON but fails during the Excel write action, throwing a System.OutOfMemoryException (error code 0x8007000E), even though system RAM is sufficient and writing to CSV works perfectly.
Before you start

Ensure you have saved a backup of your original JSON files and try temporarily closing background memory-heavy applications to free up available system resources for the COM objects.

Solution 1Recommended

Use the Write to CSV File Action

Bypass the memory constraints of Excel's COM interface by writing your extracted data table directly to a CSV file.

Excel actions in Power Automate Desktop rely on COM objects, which have strict memory limits regardless of your physical RAM. Writing directly to a CSV text file requires significantly less memory and prevents the OutOfMemoryException.

1
Remove Excel Action

In your Power Automate Desktop flow, locate and delete the existing 'Write to Excel worksheet' action that is causing the error.

2
Add CSV Action

Search for the 'Write to CSV file' action in the actions pane and drag it into your flow.

3
Configure Data Variable

Set the 'Variable to write' to the data table variable produced by your parsed JSON. Choose your preferred file path and save the action.

4
Run the Flow

Execute the flow to generate the CSV file. You can later open this file and natively save it as an .xlsx workbook.

Use the Write to CSV File Action
Workaround Validated: This method avoids Excel COM limitations entirely and operates much faster for datasets containing thousands of rows or complex properties.

Easily Convert Large CSV Exports to Excel with WPS Office

After successfully bypassing the Power Automate Desktop error by exporting your JSON to a CSV file, use WPS Spreadsheet to instantly open and save massive CSV outputs as native Excel workbooks without experiencing high memory usage or crashes.

  1. 1. Download and Install: Download and install the free WPS Office suite on your computer.
  2. 2. Open CSV File: Launch WPS Spreadsheet and open the CSV file successfully generated by your Power Automate Desktop flow.
  3. 3. Save as Excel Workbook: Click 'Menu', select 'Save As', choose 'Microsoft Excel Workbook (*.xlsx)' from the format dropdown, and save your new file.
Lightweight architecture handles exceptionally large datasets and CSV files smoothlyFully compatible with Microsoft Excel (.xlsx, .xls) formatsFamiliar spreadsheet interface that requires zero learning curve
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power Automate Desktop fail with OutOfMemoryException when writing to Excel?

This typically occurs because the Excel COM object utilized by Power Automate Desktop consumes excessive memory when receiving massive or highly complex data tables, eventually hitting an application memory limit even if your PC has available RAM.

Does error code 0x8007000E mean my computer needs more RAM?

Not necessarily. Error 0x8007000E indicates a memory allocation failure, which usually stems from the COM interface's software memory management constraints rather than a lack of physical system RAM.

Is there a file size limit for converting JSON to Excel in Power Automate?

While there isn't a strict documented file size limit, JSON strings that are excessively long or contain a vast number of nested properties can cause the internal conversion buffer in Power Automate Desktop to overflow.