Interface ISlicerCacheItem
Respresents the slicer item of the slicer
Namespace: Syncfusion.XlsIO
Assembly: Syncfusion.XlsIO.UWP.dll
Syntax
public interface ISlicerCacheItem
Properties
IsSelected
Indicates whether the slicer item is selected or not.
Declaration
bool IsSelected { get; set; }
Property Value
Type |
---|
System.Boolean |
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 |
---|
System.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();
}