Ejemplo n.º 1
0
        private async Task <IActionResult> ExportExcelAsync()
        {
            var exporter = new ExcelDataExporter();
            var streams  = exporter.Export(await _storageProvider.GetDatabaseAsync());

            return(ExportToFile(streams));
        }
Ejemplo n.º 2
0
        private void ExcelMenuItem_OnClick(object sender, RoutedEventArgs e)
        {
            if (!logic.IsCompleted())
            {
                if (MessageBox.Show("Some pages may not be completed. Export anyway?", "", MessageBoxButton.YesNo) !=
                    MessageBoxResult.Yes)
                {
                    return;
                }
            }

            try
            {
                ExcelDataExporter.ExportData(logic);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }