Row Height when exporting to Excel
Hi All I am having a nightmare when exporting data to Excel. I am using Microsft Visual Studio 2008 and am designing reports that we either export to PDF or Excel. I have a column that brings back a text field that more often than not will have multiple rows of text within the one cell. When I preview the report in VS2008 - it's fine, when I export to PDF - it's fine, but when I try to export to Excel the row height is incorrect. I can only see on line of text and not multiple lines. I know others have posted on this subject and I have tried the workarounds but nothing seems to work. If anyone can help, that would be brilliant! Thanks.
August 22nd, 2011 10:04am

Hi KazHeath, Thanks for your post. Generally speaking, all field column width and height keep in the same size when they were export to excel, so if you don’t want the column width to increase automatically, you can disable the Allow height to increase property in sizing options, so that once the string length exceed the textbox size, the exceed part will be hidden by default (hidden not truncation, when you click the cell, the whole string will appear), while the exceed part will be truncated in PDF format file. Moreover, you can also adjust the relevant field width to fit the max length of the field value, which could also fix the cells height increased issue in excel. I hope this can help you, if you have anything unclear, please feel free to let me know. Thanks, Bill Lu Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
August 24th, 2011 9:24pm

Hi KazHeath, Thanks for your feedback. Based on your furthermore confirmation, I suggest you to use your colleagues’ computer to recreate the report to have a trial. I had tested in my test environment, it seems fine, screenshot like below: If you have any other questions, please feel free to let me know. Thanks, Bill Lu Please remember to mark the replies as answers if they help and unmark them if they provide no help.If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
August 31st, 2011 4:13am

Hi Thanks for this. I am still trying to fix this issue and came up with the same answer of changing the width of the column too. The only problem when I do this is that it takes the report width over one page wide (even in Landscape). Also, the field in the report that is not displaying in excel is an NVarChar(255) so I would have to ensure that the width of the cell could accommodate this number of characters. I do want the cell height to increase when exporting to Excel if the text is too long to display on one line. The seetings are set to "Can Grow" and "Allow Height To Incease", but nothing seems to work. It does however seem to work fine in the header row???? I know that when you click in the cell in Excel, the whole string appears but the reports are for customers and we don't really want them to have to manually increase the cell height just to see the text. Thanks for your help. Kaz
Free Windows Admin Tool Kit Click here and download it now
August 31st, 2011 6:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics