Enum SlicerCacheItemSortType

SlicerCacheItemSortType enumeration

Specify the sort type of SlicerCacheItem

public enum SlicerCacheItemSortType

Values

NameValueDescription
Natural0Original data order.
Ascending1Ascending sort type
Descending2Descending sort type

Examples

namespace AsposeCellsExamples
{
    using Aspose.Cells;
    using Aspose.Cells.Slicers;
    using System;

    public class SlicersClassSlicerCacheItemSortTypeDemo
    {
        public static void Run()
        {
            try
            {
                // Create a new workbook
                Workbook workbook = new Workbook();
                Worksheet worksheet = workbook.Worksheets[0];

                // Demonstrate all values of SlicerCacheItemSortType enum
                Console.WriteLine("Available sort types:");
                Console.WriteLine($"Natural: {(int)SlicerCacheItemSortType.Natural}");
                Console.WriteLine($"Ascending: {(int)SlicerCacheItemSortType.Ascending}");
                Console.WriteLine($"Descending: {(int)SlicerCacheItemSortType.Descending}");

                // Show usage in a practical scenario
                SlicerCacheItemSortType selectedSortType = SlicerCacheItemSortType.Ascending;
                Console.WriteLine($"\nSelected sort type: {selectedSortType} ({(int)selectedSortType})");

                // Save the workbook
                workbook.Save("SlicerCacheItemSortTypeDemo.xlsx");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Error demonstrating SlicerCacheItemSortType: {ex.Message}");
            }
        }
    }
}

See Also