menu

WinUI

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TreeGridToExcelConverter - WinUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class TreeGridToExcelConverter

    Represents a class that provides the base implementation to export the SfTreeGrid to an Excel file.

    Inheritance
    System.Object
    TreeGridToExcelConverter
    Namespace: Syncfusion.UI.Xaml.TreeGrid.Export
    Assembly: Syncfusion.GridExport.WinUI.dll
    Syntax
    public class TreeGridToExcelConverter : Object
    Remarks

    Provides a set of public and virtual methods that can be overridden to customize the rows and columns of the exported data.

    Constructors

    TreeGridToExcelConverter()

    Declaration
    public TreeGridToExcelConverter()

    Fields

    ColumnFormat

    Stores column names and its format.

    Declaration
    protected Dictionary<string, string> ColumnFormat
    Field Value
    Type
    System.Collections.Generic.Dictionary<System.String, System.String>

    PropertyAccessProvider

    Declaration
    protected IPropertyAccessProvider PropertyAccessProvider
    Field Value
    Type
    IPropertyAccessProvider

    Properties

    ExcelColumnIndex

    Gets or sets the column index in worksheet to export the data.

    Declaration
    protected int ExcelColumnIndex { get; set; }
    Property Value
    Type
    System.Int32
    Remarks

    Value will be incremented ExportNodeToExcel once node is exported to export next node.

    ExcelRowIndex

    Gets or sets the row index in worksheet to export the data.

    Declaration
    protected int ExcelRowIndex { get; set; }
    Property Value
    Type
    System.Int32
    Remarks

    Value will be incremented ExportNodeToExcel once node is exported to export next node.

    Methods

    ExportNumberFormatToExcel(IRange, TreeGridColumn, Object)

    Exports the format of the specified column in the SfTreeGrid to Excel.

    Declaration
    protected virtual void ExportNumberFormatToExcel(IRange excelRange, TreeGridColumn treeGridColumn, object cellValue)
    Parameters
    Type Name Description
    IRange excelRange

    The Excel range to which the column format will be exported.

    TreeGridColumn treeGridColumn

    The column in the SfTreeGrid.

    System.Object cellValue

    The value of the cell in the column.

    ExportStackedHeaderRowToExcel(SfTreeGrid, IWorksheet, TreeGridExcelExportOptions, StackedHeaderRow)

    Exports a stacked header of the SfTreeGrid to an Excel worksheet.

    Declaration
    protected virtual void ExportStackedHeaderRowToExcel(SfTreeGrid treeGrid, IWorksheet worksheet, TreeGridExcelExportOptions excelExportOptions, StackedHeaderRow stackedHeaderRow)
    Parameters
    Type Name Description
    SfTreeGrid treeGrid

    The SfTreeGrid containing the stacked header to be exported.

    IWorksheet worksheet

    The worksheet to which the stacked header will be exported.

    TreeGridExcelExportOptions excelExportOptions

    An instance of the TreeGridExcelExportOptions class, used to set export options that may affect the exported stacked header.

    StackedHeaderRow stackedHeaderRow

    The stacked header row to be exported

    ExportToExcel(SfTreeGrid, TreeGridExcelExportOptions)

    Exports the data in the SfTreeGrid to Excel file, considering sorting, filtering, cell types, merged cells and stacked headers.

    Declaration
    public virtual ExcelEngine ExportToExcel(SfTreeGrid treeGrid, TreeGridExcelExportOptions excelExportOptions)
    Parameters
    Type Name Description
    SfTreeGrid treeGrid

    The SfTreeGrid to be exported.

    TreeGridExcelExportOptions excelExportOptions

    Specifies the instance of the classTreeGridExcelExportOptions which is used to set the exporting options.

    Returns
    Type Description
    ExcelEngine

    Returns the instance of class. ExcelEngine

    ExportToExcel(SfTreeGrid, IWorkbook, TreeGridExcelExportOptions)

    Exports the data in the SfTreeGrid to a specified workbook in an Excel document.

    Declaration
    public virtual void ExportToExcel(SfTreeGrid treeGrid, IWorkbook workbook, TreeGridExcelExportOptions excelExportOptions)
    Parameters
    Type Name Description
    SfTreeGrid treeGrid

    The SfTreeGrid to be exported.

    IWorkbook workbook

    The Excel Workbook to export the data to.

    TreeGridExcelExportOptions excelExportOptions

    An instance of the TreeGridExcelExportOptions class that is used to customize the Excel export process.

    ExportToExcel(SfTreeGrid, IWorksheet, TreeGridExcelExportOptions)

    Exports the data in the SfTreeGrid to a specified worksheet in an Excel document.

    Declaration
    public virtual void ExportToExcel(SfTreeGrid treeGrid, IWorksheet worksheet, TreeGridExcelExportOptions excelExportOptions)
    Parameters
    Type Name Description
    SfTreeGrid treeGrid

    The SfTreeGrid to be exported.

    IWorksheet worksheet

    The worksheet in the Excel document to export the data to.

    TreeGridExcelExportOptions excelExportOptions

    An instance of the TreeGridExcelExportOptions class that is used to customize the Excel export process.

    ExportToExcelWorksheet(SfTreeGrid, IWorksheet, TreeGridExcelExportOptions)

    Exports the data in the SfTreeGrid to an Excel worksheet.

    Declaration
    protected virtual void ExportToExcelWorksheet(SfTreeGrid treeGrid, IWorksheet worksheet, TreeGridExcelExportOptions excelExportOptions)
    Parameters
    Type Name Description
    SfTreeGrid treeGrid

    The SfTreeGrid to be exported.

    IWorksheet worksheet

    The worksheet to which the data will be exported.

    TreeGridExcelExportOptions excelExportOptions

    An instance of the TreeGridExcelExportOptions class that is used to customize the Excel export process.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved