Hello
I'm taking over a project that uses Infragistics.WebUI.UltraWebGrid.ExcelExport.Export(). Question is, how do I keep the Ultragrid formatting when exporting this to Excel?
The line of code for Excel export;
try {
exportControl.XLSExport.ExportMode = Infragistics.WebUI.UltraWebGrid.ExcelExport.ExportMode.InBrowser; exportControl.XLSExport.Export(MyGrid.MainSection);
}
The grid does have formatting applied and works with PDF export control (Infragistics.WebUI.UltraWebGrid.DocumentExport) but not with Excel.
Should this be handled differently? Any pointer is appreciated. Thank you.
Hi,
In general both engines are different and work in a different way as the output format is different. If you need to handle current formatting from UltraWebGrid and export it to excel you can do it by using the cellFormat. Here you can find help on how you can add styles and formats to an excel data: http://help.infragistics.com/NetAdvantage/ASPNET/2012.2/CLR4.0/?page=ExcelEngine_Applying_Styles_to_Cells.html
Also here you can find our online sample supporting this: http://es.infragistics.com/products/aspnet/sample/data-grid/excel-exporter
Please let me know if you have any furthered questions.
Thank you. I kinda figured after posted the question.