Make column Autofit when exporting to Excel


I have a simple report (SSRS 2008) with a tablix control with a few fields (textboxes). When the report is rendered to the screen, the column automatically expands to hold the longest data item in the field. Great - this is what I want.

But when I export the report to Excel, the column is not autofitted, and longer text values are wrapped in the cell.

In addition to this, the cells that have wrapped do NOT increase in height, even though the Textbox property "Allow height to increase" is selected. This means the text that has wrapped to the second and thhird lines are not immediately visible in Excel - the user has to click on the cell or increase the row height themselves.

Does anyone know how to get around this?

more ▼

asked May 01, 2012 at 01:38 PM in Default

avatar image

905 60 64 68

Can you try to create a template .xltx and export into it?

May 01, 2012 at 02:24 PM alexsdba
(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

Not really is the answer, there's no real way to control what excel does the to the report once it's exported. It should honour all the formatting options you set but I seem to remember that auto grow isn't one of the better ones.

Have you tried creating a basic dummy report and seeing if auto grow works on that. I know there are some combination of formatting etc in tablix that break things like the auto grow on export

more ▼

answered May 01, 2012 at 02:49 PM

avatar image

Dave Morrison
472 3 5 8

yeah, formatting in report != formatting in Excel. They are separate beasts that follow their own rules.

May 01, 2012 at 02:58 PM Fatherjack ♦♦

I couldn't agree more, it's a real headache dealing with the output from Reports to Excel.

May 01, 2012 at 03:08 PM Mrs_Fatherjack
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: May 01, 2012 at 01:38 PM

Seen: 3726 times

Last Updated: May 01, 2012 at 03:08 PM

Copyright 2018 Redgate Software. Privacy Policy