x
login about faq Site discussion (meta-askssc)

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
765 46 49 56

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 oldest

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
322 1 2 3

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.

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



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x486

asked: May 01 '12 at 01:38 PM

Seen: 845 times

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

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.