Abdu
Abdu

Reputation: 16585

How to stop text wrap when exporting a report viewer (SSRS) to Excel?

When exporting to Excel a report created by report viewer in Visual Studio, the cells which have Cangrow set to false, wrap their long text into several lines. This seems to happen in VS 2005, 2008 & 2010. In Excel the checkbox for textwrap is checked.

Is there a way to expand the cells horizontally and have text wrap turned off when exporting. It seems one probable solution is to do a custom export through code.

Upvotes: 8

Views: 7453

Answers (2)

Abdu
Abdu

Reputation: 16585

Went for using a third party library for doing Excel exports.

Write to certain cells in Excel spreadsheet without using Excel?

Upvotes: 1

Stefan Mohr
Stefan Mohr

Reputation: 2170

I've found the exporters built into SSRS quite rigid about what they'll let you do. I haven't had an issue with your exact problem, but suspect your only solution will in fact be as you suggested - a custom Excel rendering extension.

It's not for the faint of heart - MSDN even recommends against it because it's non trivial.

Here's the launchpad for all custom rendering extension info on MSDN if you need to go that route. Good luck to you.

http://msdn.microsoft.com/en-us/library/ms153624.aspx

Upvotes: 0

Related Questions