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
380
how to export to excel using c# ?
posted

hi

i didn't find the class used in VB.Net. could you give an example for C# ?

 

 

 

Parents
No Data
Reply
  • 1990
    Suggested Answer
    posted

    Hi panweiqi,

    You could see an example for C# in our Feature Browser (xamDataGrid node - Excel Exporter - Export To Excel sample), accessible from the Start Menu - Infragistics - NetAdvantage 2009.2 - WPF - Samples - Feature Browser.

    Basically you should use this code to create an exporter and use its export method:

     

    DataPresenterExcelExporter exporter = new DataPresenterExcelExporter();

    exporter.Export(myGrid, "Testing.xlsx", WorkbookFormat.Excel2007, this.ExportOptions());

    Hope this helps.

    Sincerely,

    Horen

     

Children