protected void ExportButton_Click(Object sender, EventArgs e) { try { var salesItems = SaleItem.LoadAllBetweenDates( this.FromTextBox.Text.ToDateTime(), this.UntilTextBox.Text.ToDateTime()); ExcelPackage data = ExcelExporter.ToSheet(salesItems); this.Response.SendExcelFile("Verkaeufe", data); } catch (Exception ex) { this.Master.ShowError(ex); } }