PdfRpt.FluentInterface.ExportToBuilder.ToExcel C# (CSharp) Method

ToExcel() public method

Microsoft Excel Worksheet DataExporter
public ToExcel ( string description = "Exported Data", string fileName = "data.xlsx", string worksheetName = "worksheet1", string footer = "", string header = "", string numberformat = "#,##0", string dateTimeFormat = "yyyy-MM-dd hh:mm", string timeSpanFormat = "hh:mm:ss", bool pageLayoutView = false, bool showGridLines = false, TableStyles tableStyle = TableStyles.Dark9 ) : void
description string the produced file's description
fileName string the produced file's name
worksheetName string the WorksheetName
footer string Footer's Text
header string Header's Text
numberformat string Number format such as #,##0
dateTimeFormat string DateTime Format such as yyyy-MM-dd hh:mm
timeSpanFormat string TimeSpan Format such as hh:mm:ss
pageLayoutView bool Sets the view mode of the worksheet to PageLayout.
showGridLines bool Show GridLines in the worksheet.
tableStyle TableStyles the produced table's style
return void
        public void ToExcel(
                     string description = "Exported Data",
                     string fileName = "data.xlsx",
                     string worksheetName = "worksheet1",
                     string footer = "",
                     string header = "",
                     string numberformat = "#,##0",
                     string dateTimeFormat = "yyyy-MM-dd hh:mm",
                     string timeSpanFormat = "hh:mm:ss",
                     bool pageLayoutView = false,
                     bool showGridLines = false,
                     TableStyles tableStyle = TableStyles.Dark9
                     )
        {
            var exportToExcel = new ExportToExcel
            {
                DateTimeFormat = dateTimeFormat,
                Description = description,
                FileName = fileName,
                Footer = footer,
                Header = header,
                Numberformat = numberformat,
                PageLayoutView = pageLayoutView,
                ShowGridLines = showGridLines,
                TableStyle = tableStyle,
                TimeSpanFormat = timeSpanFormat,
                WorksheetName = worksheetName
            };
            _pdfReport.DataBuilder.CustomExportSettings.Add(exportToExcel);
        }