private void btnExport_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         string fileName = System.IO.Path.GetTempPath() + "TempFile.xlsx";
         DataPresenterExcelExporter excelExporter = new DataPresenterExcelExporter();
         excelExporter.ExportAsync(this.xamDataGridControl, fileName, WorkbookFormat.Excel2007);
         System.Windows.MessageBox.Show("File save successfully. \n" + fileName);
     }
     catch (Exception ex)
     {
         System.Windows.MessageBox.Show(ex.Message);
     }
 }
Beispiel #2
0
        private void exportButton_Click(object sender, RoutedEventArgs e)
        {
            DataPresenterExcelExporter exporter = new DataPresenterExcelExporter();

            exporter.ExportAsync(this.dg1, "C:\\Users\\Himanshu\\Documents\\SaleAllocationReports\\PosSaleReport.xlsx", WorkbookFormat.Excel2007);
        }