alexa
menu

MAUI

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

    Show / Hide Table of Contents

    Interface ISlicerCacheItem

    Respresents the slicer item of the slicer

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

    Properties

    IsSelected

    Indicates whether the slicer item is selected or not.

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

    Following code illustrates how to find whether the slicer item is selected or not.

     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];
         bool selected = slicer.SlicerCache.SlicerCacheItems[0].IsSelected;
    
        workbook.SaveAs("Slicer.xlsx");
        workbook.Close();
        excelEngine.Dispose();
    }

    Value

    Gets the item text of the slicer.

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

    Following code illustrates how to gets the label text 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];
        string value = slicer.SlicerCache.SlicerCacheItems[0].Value;
    
        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