alexa
menu

MAUI

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

    Show / Hide Table of Contents

    Interface ISlicerCacheItems

    Respresents the slicer item collection of the slicer

    Inherited Members
    IEnumerable.GetEnumerator()
    Namespace: Syncfusion.XlsIO
    Assembly: Syncfusion.XlsIO.NET.dll
    Syntax
    public interface ISlicerCacheItems : IEnumerable

    Properties

    Count

    Gets or sets the the number of items present in the slicer.

    Declaration
    int Count { get; }
    Property Value
    Type
    int
    Examples

    Following code illustrates how to get the count of the slicer items.

     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];
        int count = slicer.SlicerCache.SlicerCacheItems.Count;
    
        workbook.SaveAs("Slicer.xlsx");
        workbook.Close();
        excelEngine.Dispose();
    }

    this[int]

    Gets the slicer cache item object based on the given index.

    Declaration
    ISlicerCacheItem this[int index] { get; }
    Parameters
    Type Name Description
    int index
    Property Value
    Type
    ISlicerCacheItem
    Examples

    Following code illustrates how to access the slicer cache items.

     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();
    }
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved