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.
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.
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.
I have had good success by setting the CellMultiLine property of the Column (on the Infragistics grid). This seems to set the row height appropriately.
Mike Saltzman"]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.
This is excellent information. I never knew this was possible, but I will definitely make use of this now.