x

Make column Autofit when exporting to Excel

Hi,

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 '12 at 01:38 PM in Default

xnl28 gravatar image

xnl28
895 54 58 61

Can you try to create a template .xltx and export into it?
May 01 '12 at 02:24 PM alexsdba
(comments are locked)
10|1200 characters needed characters left

1 answer: sort newest

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 '12 at 02:49 PM

Dave Morrison gravatar image

Dave Morrison
472 2 2 4

yeah, formatting in report != formatting in Excel. They are separate beasts that follow their own rules.
May 01 '12 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 '12 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.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

SQL Server Central

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

Topics:

x536

asked: May 01 '12 at 01:38 PM

Seen: 1583 times

Last Updated: May 01 '12 at 03:08 PM