Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 248
Abdu Avatar asked Oct 11 '10 22:10

Abdu


People also ask

How do I turn off auto wrap text in Excel?

Select the cells or could be the entire sheet where you want auto-wrap text to be disabled > Right-click > Format cells > Click on "Alignment" tab > Under text control, remove the checkmark from the "wrap text" option.

What is wrap text automatically?

Wrap: Wrapped text manipulates the cell so that it expands vertically to accommodate the data. Visually, the cell contains multiple lines of text, like a paragraph. Shrink to fit: This option automatically reduces the font size of text data so that it fits inside the cell's boundaries without wrapping.


1 Answers

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

Write to certain cells in Excel spreadsheet without using Excel?

like image 71
Abdu Avatar answered Nov 15 '22 05:11

Abdu