Tuesday, 28 March 2017

SSRS Snack: Excel Rendering Extension Error

Case
I am trying to export my SSRS report to Excel, but I'm getting an error. How Can I solve it?
Excel Rendering Extension: Unknown image format image/x-png















Solution
You are using one or more PNG pictures in your reports and SSRS doesn't know how to render these because they have an unknown mime format: image/x-png 

1) Solution Explorer
Go to your SSRS project in Visual Studio and search for PNG images in your Solution Explorer.
Solution Explorer



















2) Properties
Now go to the properties of this image file (F4) and locate the property MIME Type.
image/x-png



















3) Change MIME Type
Change the MIME Type from image/x-png to image/png and repeat this for all PNG images.
image/png


















4) Deploy and test
Now deploy your change project and reopen the report to test the excel export
Export to Excel

















2 comments:

  1. This works but is not a scalable solution; if I have multiple projects with numerous reports and each has a few different images it's very tedious to implement this solution. Is there any way this can be done server side so it works for every report? Thanks very much.

    ReplyDelete
    Replies
    1. Have not tested other solutions, but I have two alternatives that you could investigate:

      1) search and replace within the XML code of the SSRS reports

      2) add a new mime type on the server (copy of png, but with other name)

      Delete

All comments will be verified first to avoid URL spammers. यूआरएल स्पैमर से बचने के लिए सभी टिप्पणियों को पहले सत्यापित किया जाएगा।