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.
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.
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.
Went for using a third party library for doing Excel exports.
Write to certain cells in Excel spreadsheet without using Excel?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With