Dilimleyici Biçimlendirme

Olası Kullanım Senaryoları

Dilimleyiciyi Microsoft Excel’de sütun sayısını ayarlayarak veya stili ayarlayarak biçimlendirebilirsiniz. Aspose.Cells ayrıca bunu Slicer.NumberOfColumns ve Slicer.StyleType özelliklerini kullanarak yapmanıza olanak tanır.

Dilimleyici Biçimlendirme

Lütfen aşağıdaki kodu görün. İçinde bir dilimleyici içeren örnek Excel dosyasını yükler. Dilimleyiciye erişir ve sütun sayısını ve stil türünü ayarlar ve bu şekilde çıkış Excel dosyasını kaydeder. Ekran görüntüsü, örnek kodun çalıştırılmasından sonra dilimleyicinin nasıl göründüğünü gösterir.

todo:image_alt_text

Örnek Kod

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Load sample Excel file containing slicer.
Workbook wb = new Workbook("sampleFormattingSlicer.xlsx");
// Access first worksheet.
Worksheet ws = wb.Worksheets[0];
// Access the first slicer inside the slicer collection.
Aspose.Cells.Slicers.Slicer slicer = ws.Slicers[0];
// Set the number of columns of the slicer.
slicer.NumberOfColumns = 2;
// Set the type of slicer style.
slicer.StyleType = Aspose.Cells.Slicers.SlicerStyleType.SlicerStyleLight6;
// Save the workbook in output XLSX format.
wb.Save("outputFormattingSlicer.xlsx", SaveFormat.Xlsx);