Failed to Generate Excel: An error occurred

By | February 9, 2018

I was trying to export data to an excel spreadsheet earlier today and ran into something that I have not seen before:

Failed to Generate Excel

An error occurred when Dynamics 365 tried to generate the Excel file. If this problem persists, contact your system administrator.


This was happening on a seemingly innocent view which had lots of columns in it. And, as you can see from the screenshot above, there is not a lot of additional information I was able to find in the log file (since there was no log file).

Was it about the total number of columns? Was it something else? It could not be because of the large data set since I did not have that much data..

What you see on the screenshot below is a reproduction:


There are only a few columns in the view, but if you try to export data to excel from that view, you’ll get exactly the same error. The same will happen if you try to download an excel template using that view.

Notice how there are two different fields with the same display label in that view. That’s exactly what was causing the error – changing the display label for one of the fields so that display labels become unique in the view solves the problem:


5 thoughts on “Failed to Generate Excel: An error occurred

  1. Katja Pekkarinen


    I got the same error message. I checked fields display names and there weren’t same display names. My problems was that some fields had unvalid information. It figures out there was information although the field was empty or there was – or there was some other signs (why; it is other story).

    I found which fields caused the problem by adding and removing columns from advanced find results and tried to export data to excel after every removing/adding. After I knew which fields has problems I made couple advanced find. First I searched results where the field (which has problem) was empty and try to export results to excel. It worked ok. Second I searched data where the field has data and try to export it. It didn’t work. Then I configured sorting to sort by the field ascending order so I got empty fields first. I filled empty fields with right data and try to export and it worked after corrected.

    Hopefully my problems help you to solve your problems.

    1. Alex Shlega Post author

      Hi Katja,

      thank you for sharing. Just to clarify, though, was it a problem with the empty values, or was it a problem with the populated values? (not that I have any idea why it was happening)

  2. Pasha Pilgrim

    Totally my case. Two fields have the same display name.
    The issue resolved. Thank you, Alex

  3. Sian

    Twice in two days your blog has solved two totally different problems for me! Thank you, Alex!


Leave a Reply

Your email address will not be published. Required fields are marked *