menu

ASP.NET MVC - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridExcelExport - ASP.NETMVC-EJ2 API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridExcelExport

    Helper for grid excel export

    Inheritance
    System.Object
    GridExcelExport
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.EJ2.GridExport
    Assembly: Syncfusion.EJ2.GridExport.dll
    Syntax
    public class GridExcelExport

    Constructors

    GridExcelExport()

    Declaration
    public GridExcelExport()

    Properties

    AutoFormat

    Declaration
    public AutoFormat AutoFormat { get; set; }
    Property Value
    Type
    AutoFormat

    DataSource

    Gets or sets the datasource of the grid.

    Declaration
    public IEnumerable DataSource { get; set; }
    Property Value
    Type Description
    System.Collections.IEnumerable

    The Datasource of the grid.

    Document

    Gets or sets the Document.

    Declaration
    public object Document { get; set; }
    Property Value
    Type Description
    System.Object

    The Document for exporting.

    EmptyText

    Gets or sets the Empty record text of the file.

    Declaration
    public string EmptyText { get; set; }
    Property Value
    Type Description
    System.String

    The name of the file.

    Excelversion

    Gets or sets the excel version.

    Declaration
    public ExcelVersion Excelversion { get; set; }
    Property Value
    Type Description
    Syncfusion.XlsIO.ExcelVersion

    The excel version.

    FileName

    Gets or sets the name of the file.

    Declaration
    public string FileName { get; set; }
    Property Value
    Type Description
    System.String

    The name of the file.

    FilePath

    Gets or sets the File Path for saving file.

    Declaration
    public string FilePath { get; set; }
    Property Value
    Type Description
    System.String

    The File Path for saving file in local.

    FontWeight

    Declaration
    public FontWeight FontWeight { get; set; }
    Property Value
    Type
    Syncfusion.EJ2.GridExport.FontWeight

    HeaderText

    Gets or sets the Header Text for multiple export.

    Declaration
    public string HeaderText { get; set; }
    Property Value
    Type Description
    System.String

    HeaderText for multiple export.

    IsHideColumnIncude

    Gets or sets the IsHideColumnInclude for grid.

    Declaration
    public bool IsHideColumnIncude { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsHideColumnInclude in file.

    LocalSave

    Gets or sets the is file locally saved.

    Declaration
    public bool LocalSave { get; set; }
    Property Value
    Type Description
    System.Boolean

    The LocalSave option for file.

    SourceType

    Declaration
    public Type SourceType { get; set; }
    Property Value
    Type
    System.Type

    Theme

    Gets or sets the Theme of the file.

    Declaration
    public string Theme { get; set; }
    Property Value
    Type Description
    System.String

    The Theme of the file.

    WorkBook

    Gets or sets the excel workbook.

    Declaration
    public IWorkbook WorkBook { get; set; }
    Property Value
    Type Description
    Syncfusion.XlsIO.IWorkbook

    The excel workbook.

    Methods

    CopyBorders(GridTableCellType, IRange)

    Copies the borders.

    Declaration
    protected void CopyBorders(GridTableCellType style, IRange range)
    Parameters
    Type Name Description
    GridTableCellType style

    The style.

    Syncfusion.XlsIO.IRange range

    The range.

    CopyStyles(GridTableCellType, IRange)

    Declaration
    protected void CopyStyles(GridTableCellType style, IRange range)
    Parameters
    Type Name Description
    GridTableCellType style
    Syncfusion.XlsIO.IRange range

    CsvExport<T>(Grid, IEnumerable, ExcelExportProperties)

    Declaration
    public ActionResult CsvExport<T>(Grid GridModel, IEnumerable result, ExcelExportProperties ExportProperties = null)
    Parameters
    Type Name Description
    Grid GridModel
    System.Collections.IEnumerable result
    ExcelExportProperties ExportProperties
    Returns
    Type
    System.Web.Mvc.ActionResult
    Type Parameters
    Name
    T

    CsvExport<T>(Grid, IEnumerable, Boolean, ExcelExportProperties)

    Declaration
    public object CsvExport<T>(Grid GridModel, IEnumerable result, bool AsMemoryStream, ExcelExportProperties ExportProperties = null)
    Parameters
    Type Name Description
    Grid GridModel
    System.Collections.IEnumerable result
    System.Boolean AsMemoryStream
    ExcelExportProperties ExportProperties
    Returns
    Type
    System.Object
    Type Parameters
    Name
    T

    ExcelExport<T>(Grid, IEnumerable, ExcelExportProperties)

    Gets or sets the excel workbook.

    Declaration
    public ActionResult ExcelExport<T>(Grid GridModel, IEnumerable result, ExcelExportProperties ExportProperties = null)
    Parameters
    Type Name Description
    Grid GridModel
    System.Collections.IEnumerable result
    ExcelExportProperties ExportProperties
    Returns
    Type
    System.Web.Mvc.ActionResult
    Type Parameters
    Name
    T

    ExcelExport<T>(Grid, IEnumerable, Boolean, ExcelExportProperties)

    Declaration
    public object ExcelExport<T>(Grid GridModel, IEnumerable result, bool AsMemoryStream, ExcelExportProperties ExportProperties = null)
    Parameters
    Type Name Description
    Grid GridModel
    System.Collections.IEnumerable result
    System.Boolean AsMemoryStream
    ExcelExportProperties ExportProperties
    Returns
    Type
    System.Object
    Type Parameters
    Name
    T

    ExcelTextSize(String, Single, String)

    Calculate the text width and height.

    Declaration
    public SizeF ExcelTextSize(string fontFamily, float size, string text)
    Parameters
    Type Name Description
    System.String fontFamily
    System.Single size
    System.String text
    Returns
    Type
    System.Drawing.SizeF

    ExportRecordRow(String)

    Exports the record row.

    Declaration
    protected void ExportRecordRow(string value)
    Parameters
    Type Name Description
    System.String value

    The value.

    HeaderCellRotate(ServerExcelHeaderQueryCellInfoEventArgs, Int32)

    Rotate the Header cell text based on the degree value.

    Declaration
    public void HeaderCellRotate(ServerExcelHeaderQueryCellInfoEventArgs args, int degree)
    Parameters
    Type Name Description
    ServerExcelHeaderQueryCellInfoEventArgs args
    System.Int32 degree

    SetFontStyles(IRange, Boolean)

    Declaration
    protected void SetFontStyles(IRange range, bool summary)
    Parameters
    Type Name Description
    Syncfusion.XlsIO.IRange range
    System.Boolean summary
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved