Fix Excel Online 'Sorry, Something Went Wrong' Error for Empty CSV Files
Question details
The user encounters an error when trying to open empty CSV files in Excel Online, whereas the same files open correctly in the desktop version.

- Product
- Excel Online
- Device & OS
- not provided
- Scenario
- Opening a CSV file generated by Power Automate in SharePoint using Excel Online.
- Observed behavior
- Empty CSV files fail to load in Excel Online and display a 'Sorry, something went wrong' error, but they open normally in Excel Desktop.
Verify whether the CSV file causing the error is completely empty or if it contains headers without data rows. You can quickly check this by downloading the file and opening it in a simple text editor like Notepad.
Add a Placeholder Data Row in Power Automate
Prevent Excel Online from failing by ensuring the generated CSV file is never completely empty.
Excel Online has a known limitation where it struggles to render completely empty flat-text files. By injecting a dummy row when no actual data exists, you can bypass this web viewer glitch.
Open the Power Automate flow that is responsible for generating the CSV file in your SharePoint directory.
Insert a Condition step right before the CSV creation action to check if your data output array is empty.
If the array is empty, configure the 'If yes' branch to append a default row (such as a zero-value row or 'No data available') to the CSV file creation step.
Save your flow and trigger it manually. Navigate to SharePoint and verify that the newly generated CSV file opens successfully in Excel Online.

Open the Empty CSV Using the Desktop App
Bypass the Excel Online limitation entirely by opening the file in a desktop spreadsheet application.
Open Any CSV File Smoothly with WPS Office
If you frequently encounter glitches and loading errors with Excel Online, consider switching to WPS Office. It provides a robust, lightweight desktop application that effortlessly opens CSV files—whether completely empty or heavily loaded with data—bypassing web-based limitations altogether.
- 1. Download WPS Office: Visit the official WPS Office website and click the free download button.
- 2. Install the application: Run the downloaded installer and follow the quick on-screen instructions to set up the software.
- 3. Set as default for CSV: Right-click any CSV file on your computer, select 'Open with', choose WPS Spreadsheets, and check 'Always use this app to open .csv files'.

Frequently Asked Questions
Why does Excel Online fail to open empty CSV files?
Excel Online sometimes struggles to parse and render the spreadsheet grid for completely empty text-based data files like CSVs. This is a known limitation of the web-based viewer compared to the more robust desktop application.
Can I fix this error without changing my Power Automate flow?
If you cannot modify the automated flow to insert dummy data, your best alternative is to download the file locally or use the 'Open in Desktop App' feature in SharePoint to view the CSV without encountering the web error.
Does this error happen with empty XLSX files in Excel Online?
Typically, no. Native Excel formats like XLSX contain structural metadata that allows Excel Online to open and display them even when there is no cell data. The issue is highly specific to flat-text formats like CSV.
How do I report this empty CSV bug to Microsoft?
You can report this behavior by clicking the 'Help' tab while inside Excel Online and selecting 'Feedback'. Describe the issue to notify the development team about the empty CSV rendering limitation.




