Hi,in XamGrid I want to export the data to excel;in your control XamDataGrid I can use the DataPresenterExcelExporter-Class.Is there a way to use the DataPresenterExcelExporter-Class in XamGrid?Thanks voks
Hi voks,
Because of the underlying differences between the XamGrid and XamDataGrid, the DataPresenterExcelExporter can only be used with the XamDataGrid.
I think this link will be very helpful. It explains how you can export the XamGrid to Excel.http://help.infragistics.com/Help/NetAdvantage/Silverlight/2011.2/CLR4.0/html/SL_Exporting_xamGrid_Data_to_Excel.html
A few things to note. The link points to the Silverlight documentation but the code used to export the grid is the same for WPF as well. Make sure you include the WPF versions of the assemblies mentioned on the page as well as add InfragisticsWPF4.DataManager.v11.2.dll to the list.
Let me know if you have any questions on this.
Hi,
I could't find equivalent InfragisticsSL5.Controls.Grids.ExcelExporter.v12.1.dll in WPF. Can you attach a sample project with this post on how to use Export to Excel API in WPF?
Thanks,
Varun
Hi Varun,
That's because there is no equivalent. The XamGridExcelExporter is only available in Silverlight. If you want to export the XamGrid in WPF you'll need to manually iterate through all the rows and export the cell data to Excel using the Infragistics Excel Framework. I've included the previous sample converted to WPF.
Thanks a lot.
Actually I wrote similar code to export to excel. By reading that post I thought therer is inbuilt support for it so I was trying that out.
By the way is there any plan to support Export to excel for WPF as well in future?
I'm not aware of any plans to create a version of the XamGridExcelExporter for WPF but since it is currently not supported for WPF I suggest creating a new idea for it on our product ideas website. http://ideas.infragistics.com/forums/192363-wpf