Support Article
Export to Excel from reports raises error "Unable to read file"
SA-22450
Summary
Export to Excel from a report definition works the first time. The user closes Excel session and exports once again.
This time the "Unable to read file." error is raised from Excel and the data fails to load into spreadsheet.
Error Messages
Unable to read file.
Steps to Reproduce
1. Export to Excel from a report definition.
2. Close Excel session.
3. Export to Excel once again.
Root Cause
This is an IE11 specific issue and not a Pega defect. IE11 prompts the user to open the file before it is fully cached on the client.
Resolution
Local-change options:
1. If the user is more patient and waits a moment before clicking open, the Excel report loads successfully. IE11 sometimes provides an indication when the download is completed.
For example: When the user clicks Export to Excel, at first the security dialog looks like this (notice the color):
As long as the user avoids hovering mouse cursor over the dialog and waits for a while, the dialog will blink and change color. At this point click the "Open" button and the export succeeds.
2. Instead of “Open”, choose one of the Save options to save to disk first. Then open the saved file in Excel.
3. Use alternate browsers for exporting reports, for example Chrome or Firefox.
Published April 27, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.