示例#1
0
        public async Task ExcelExport()
        {
            var exportProperties = new ExcelExportProperties();

            exportProperties.IncludeHiddenColumn = true;
            await CovidDataGrid.ExcelExport(exportProperties);
        }
示例#2
0
        public void ExcelExport()
        {
            ExcelExportProperties ExcelProperties = new ExcelExportProperties();
            ExcelTheme            Theme           = new ExcelTheme();

            ExcelStyle ThemeStyle = new ExcelStyle()
            {
                FontName  = "Segoe UI",
                FontColor = "#666666",
                FontSize  = 12
            };

            Theme.Header             = ThemeStyle;
            Theme.Record             = ThemeStyle;
            Theme.Caption            = ThemeStyle;
            ExcelProperties.Theme    = Theme;
            ExcelProperties.FileName = $"Excel file_{DateTime.Now}.xlsx";
            // ExcelProperties.ExportType = Syncfusion.Blazor.Grids.ExportType.CurrentPage;
            this.DefaultGrid.ExcelExport(ExcelProperties);
        }