Reporting Services export to Excel causes 'Repair' and removes styles
Asked Answered
H

4

9

I have quite a complex SSRS report that I would like to export to Excel more or less how it looks in the web output.

Export to Excel and opening in Excel 2010 yields the following error:

Excel was able to open the file by repairing or removing the unreadable content. Removed part: /xl/styles.xml part (Styles)

All the styling is gone from the report, so it looks terrible.

Hoelscher answered 7/5, 2014 at 5:12 Comment(0)
H
15

After isolation testing it I have fixed 99% of the style errors by one simple change:

Excel doesn't seem to like 'Total' cells for Row Groups within tables having no Font='' (these cells are auto-created when you create a total for a group)

Font=", 10pt, Default, Bold, Default"

Change Font to "Arial":

Font="Arial, 10pt, Default, Bold, Default"

Hoelscher answered 7/5, 2014 at 8:13 Comment(3)
I found that if any of the cells are left default it is likely to throw an error. Best to set the font equal Arial or something that suitsCommode
Yeah, in my case, it was the Tablix headers that were missing the font. Explicitly setting Arial fixed it. Thanks, both!Barbecue
Well found - thats an annoying bug.Iverson
A
0

Another thing to look for if all of your textboxes have a font name is the Format Property. I had a date field that I wanted formatted, so, in the Format field, I used =Format(Fields!CreatedDate.Value, "MM/dd/yyyy"). This worked when viewing the report, however, when exporting, received the unreadable content error. I eventually just used: MM/dd/yyyy in the format property, that solved my problem.

Amato answered 30/3, 2016 at 17:1 Comment(0)
R
0

In my case, I fixed this by preventing a divide-by-zero.

For some weird reason, instead of failing to render a divide-by-zero, it displays the word Infinity.

enter image description here

Rhizobium answered 14/4, 2016 at 17:38 Comment(0)
P
0

I had seen this same message opening an exported SSRS report in Excel. Within the RDL, I had configured the Format property using DateFormat in an expression for the textboxes that displayed a date. I want to automate the SSRS report using a subscription and I'm concerned the formatting issue may interrupt, so instead I changed the SQL query to format the date and removed the formatting expression from the textboxes. Aftersuch, I did not get this error when opening the exported file in Excel.

Palindrome answered 3/7 at 11:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.