Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
480
Exporting grid to excel with Auto Fit Row Height and Text Wrap
posted

Hello. I've got a grid with some large paragraphs of text in it (help desk problem descriptions).

I've made 'em look fine in the grid - the rows are fat enough, the text wraps - but when I export to excel, I need to take two extra steps to make the spreadhseet match the grid:

1) I need to go into format cells -> alignment and check the 'Wrap Text' checkbox.

2) I need to go to format and select 'Auto Fit Row Height'.

Is there any way to accomplish this through the export? I don't really want to open the spreadsheet and play with it when it seems to me that an export of the grid should yield a spreadsheet that looks like the grid.

I mean, my grouping works correctly, why not this?

 

Thanks.

Parents
  • 469350
    Suggested Answer
    Offline posted

    samc1959 said:
    1) I need to go into format cells -> alignment and check the 'Wrap Text' checkbox.

    Wrap Text is expose on the cell format. So you can set this in the CellExported event of the UltraGridExcelExporter.The event args give you the current worksheet, the current row index, and the current column index. So you can use those to get the cell and get the Format of the cell from there.

    samc1959 said:

    2) I need to go to format and select 'Auto Fit Row Height'.

    Is there any way to accomplish this through the export? I don't really want to open the spreadsheet and play with it when it seems to me that an export of the grid should yield a spreadsheet that looks like the grid.

    The Infragistics.Excel engine currently does not expose this, so there's no way to do it right now. You should Submit a feature request to Infragistics that this be added, as well as a request that the WrapText property be set automatically for you by the UltraGridExcelExporter.

     

     

Reply Children
No Data