alexa
menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Interface ISlicerCache

    Represents the slicer cache of the slicer.

    Namespace: Syncfusion.XlsIO
    Assembly: Syncfusion.XlsIO.NET.dll
    Syntax
    public interface ISlicerCache

    Properties

    CrossFilterType

    Gets or sets the cross filter type of the slicer

    Declaration
    SlicerCrossFilterType CrossFilterType { get; set; }
    Property Value
    Type
    SlicerCrossFilterType
    Examples

    Following code illustrates how to get and change the CrossFilterType of the Slicer.

     using (ExcelEngine excelEngine = new ExcelEngine())
    {
       IApplication application = excelEngine.Excel;
       IWorkbook workbook = application.Workbooks.Open("Slicer.xlsx");
       IWorksheet worksheet = workbook.Worksheets[0];     
    
        ISlicer slicer = worksheet.Slicers[0];
        slicer.SlicerCache.CrossFilterType = SlicerCrossFilterType.HideItemsWithNoData;
    
        workbook.SaveAs("Slicer.xlsx");
        workbook.Close();
        excelEngine.Dispose();
    }

    IsAscending

    Indicates whether the items in the slicer is sorted in the ascending order.

    Declaration
    bool IsAscending { get; set; }
    Property Value
    Type
    bool
    Examples

    Following code illustrates how to get or set the sort order.

     using (ExcelEngine excelEngine = new ExcelEngine())
    {
       IApplication application = excelEngine.Excel;
       IWorkbook workbook = application.Workbooks.Open("Slicer.xlsx");
       IWorksheet worksheet = workbook.Worksheets[0];     
    
        ISlicer slicer = worksheet.Slicers[0];
        slicer.SlicerCache.IsAscending = true;
    
        workbook.SaveAs("Slicer.xlsx");
        workbook.Close();
        excelEngine.Dispose();
    }

    SlicerCacheItems

    Gets the items of the slicer cache

    Declaration
    ISlicerCacheItems SlicerCacheItems { get; }
    Property Value
    Type
    ISlicerCacheItems
    Examples

    Following code illustrates how to get or set the sort order.

     using (ExcelEngine excelEngine = new ExcelEngine())
    {
       IApplication application = excelEngine.Excel;
       IWorkbook workbook = application.Workbooks.Open("Slicer.xlsx");
       IWorksheet worksheet = workbook.Worksheets[0];     
    
        ISlicer slicer = worksheet.Slicers[0];
        ISlicerCacheItems cacheItems = slicer.SlicerCache.SlicerCacheItems;
    
        workbook.SaveAs("Slicer.xlsx");
        workbook.Close();
        excelEngine.Dispose();
    }

    SourceName

    Gets the name of the cache field.

    Declaration
    string SourceName { get; }
    Property Value
    Type
    string
    Examples

    Following code illustrates how to get the Name of the cache field.

     using (ExcelEngine excelEngine = new ExcelEngine())
    {
       IApplication application = excelEngine.Excel;
       IWorkbook workbook = application.Workbooks.Open("Slicer.xlsx");
       IWorksheet worksheet = workbook.Worksheets[0];     
    
        ISlicer slicer = worksheet.Slicers[0];
        string Name = slicer.SlicerCache.SourceName;
    
        workbook.SaveAs("Slicer.xlsx");
        workbook.Close();
        excelEngine.Dispose();
    }

    UseCustomListSorting

    Indicates whether the custom list is used for sorting.

    Declaration
    bool UseCustomListSorting { get; set; }
    Property Value
    Type
    bool
    Examples

    Following code illustrates how to set the Custom list sorting.

     using (ExcelEngine excelEngine = new ExcelEngine())
    {
       IApplication application = excelEngine.Excel;
       IWorkbook workbook = application.Workbooks.Open("Slicer.xlsx");
       IWorksheet worksheet = workbook.Worksheets[0];     
    
        ISlicer slicer = worksheet.Slicers[0];
        slicer.SlicerCache.UseCustomListSorting = true;
    
        workbook.SaveAs("Slicer.xlsx");
        workbook.Close();
        excelEngine.Dispose();
    }
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved