16

I have a report I am doing with SSRS 2008 with some rows that have multiple elements inside them. On the preview the row automatically expands to support the extra elements but however when I export the report to Excel it appears only as a single row with just the one element displayed, although all the elements are there when I double click the row or manually expand it.

I've checked everything...Can grow is set to true and the properties on the text box allows it's height to increase however it seems to ignore these.

Here it is in the preview http://tinypic.com/r/b4wbdg/8

In Excel http://tinypic.com/r/r084g3/8

Sorry about the links to the pictures and not in this question

BenYeomans
  • 383
  • 2
  • 7
  • 15

6 Answers6

32

Both CanGrow and CanShrink properties should be set to false. There is nothing like CanGrow and CanShrink in Excel. By setting them to false it will display the height as it is. Otherwise it will set the height to a default value.

This worked for me. Check this Row height not preserved when exporting to Excel thread for more suggestions.

PiotrWolkowski
  • 8,408
  • 6
  • 48
  • 68
  • 2
    It does. Unfortunately you have to manually change the row height to accommodate exported line wraps but the CanGrow property still has to be set to false for the excel export to work properly. This is a bug. Wonder if fixed in future versions as still on Reports Builder 3.0 – Gary Thomann Aug 10 '18 at 04:28
  • Hi @GaryThomann, I'm facing same problem and tried as mentioned on above comment and still the excel export shows the header column as single line. I've used matrix table with in another matrix table group in my design and inner matrix table column is defaulted to single line regardless of manual change on row height. – Raj K Aug 26 '19 at 06:10
10

Came across this (again) recently and thought I'd share my take...

Whether Excel correctly renders the height has to do with merged columns. Take note of your column alignments throughout all objects on the page. Any objects not tied to the data table itself (or embedded inside the data table) must be aligned with the columns of the table in question, at least for the cells that need to wrap text. If there is any overlap causing the table columns to be split and the cells of wrapped text to be re-merged, Excel will not recognize the row height by either setting the CanGrow to True or snapping the row to fit within Excel.

In the original post, the user mentioned rows with multiple elements inside of them. It is possible that those elements caused the column to split for the surrounding subtotals or adjacent groups with wrapped text.

Setting the CanGrow to False will simply prevent any automatic sizing of the row height by default for both the web view and Excel export, so I don't know if that's the ideal solution to this problem.

SumoBI
  • 101
  • 1
  • 4
  • 4
    I feel like this answer provides a more robust explanation. Changing Can Grow/Shrink was not helping me but when I looked at the merging of cells and unmerged any cells I wanted to grow/shrink then it worked perfectly on both the web view and the Excel export. – Jericho May 27 '20 at 16:36
  • 1
    That was my problem. There was a logo at the top of the report and the first column was larger than the image. Once I made the column smaller than the image width, it fixed it and the line of the column would expand if content was too long for the width of the column – Wildhorn Jan 29 '21 at 12:26
  • In my case a few "page width" columns were not as wide as some others. Once I made them all match, column heights were ok (i.e. double height if content spanned 2 lines). CanGrow is true and CanShrink is not specified for all columns. – James McLachlan Sep 08 '21 at 19:22
6

Both CanGrow and CanShrink properties should be set to false This must be done for all cells in the row of the Tablix!! Otherwise the data is not properly exported.

William
  • 61
  • 1
  • 2
1

I remove the header of the report, and all works perfectly.

I have other reports and I see now that if I remove the textboxes that are included on the sheet when exporting to excel, then the row heights in excel are sized properly.

Hugues Gauthier
  • 639
  • 8
  • 18
  • 1
    I had the same issue but was able to fix it by making sure the boundaries of the textboxes lined up exactly with the columns or boundaries of the data table/matrix – dalcam Feb 07 '23 at 20:52
0

reduce the widths of the rows and it fixed my problem

BenYeomans
  • 383
  • 2
  • 7
  • 15
0

I know this is an old question but I've been struggling with it. My issue was that I had a second field in a column where I inserted a placeholder underneath the field in the column. When exporting to Excel I wanted it to be tall enough that the second field would show underneath the main field in the column.

To get it to work for me, I inserted a blank column next to it and made it just wide enough for a single character. Then I click and hit enter several times to force it to be multiple lines. When I export, I have a blank column but otherwise it worked for me.

J West
  • 13
  • 3