Hello,
I have an UltraGrid which uses an UltraFormattedTextEditor as its cells editor component. When the UltraGrid is exported using UltraGridExcelExporter any formatting and markup originally applied to cell is lost in the exported excel document. Is there any way I can export the grid and retain the formatting which was applied to the cell?
Many thanks,
Hi,
No, there is no way to do this, because Excel doesn't have support for this kind of formatting inside a cell.
Excel does support a limited set of HTML format though.
From Word you can paste as HTML, and it will retain things like font sizes, bold, italic, etc.... but not other things like background span colour changes.
I would have thought this was a logical thing to support for the UltraFormattedTextEditor.
Hm... I did a little more digging and the Infragistics Excel assembly supports something called a FormattedString. So, while there is no automatic way to do this, you could trap the events of the UltraGridExcelExporter like CellExported, get the XML yourself, parse it, and try to convert it into a FormattedString.
The UltraGridExcelExporter does not currently support this, though.