Sayfa Sekmesi Çubuğunu Nasıl Kontrol Edilir

Olası Kullanım Senaryoları

Excel sayfa çubuğunun gösterimini ayarlamanız gerektiğinde, sayfa sekmesi çubuğunu nasıl kontrol edeceğinizi bilmelisiniz; örneğin, sayfa sekmesi çubuğunu gizleme veya gösterme, sayfa sekmesi çubuğu genişliğini değiştirme, ilk görünür sekme spefisize etme vb. Aspose.Cells bu özellikleri destekler. Aspose.Cells, hedeflerinize ulaşmanıza yardımcı olmak için aşağıdaki özellikleri ve yöntemleri sağlar.

Aspose.Cells for .NET kullanarak Sayfa Sekmesi Çubuğunu Kontrol Etme

Bu örnek aşağıdakileri göstermektedir:

  1. Bir çalışma kitabı oluşturma.
  2. İlk çalışma sayfasındaki hücrelere veri ekleme.
  3. Sayfa sekmesini görüntüleyin ve sekme çubuğunun genişliğini ayarlayın.
//Instantiating an Workbook object
Workbook workbook = new Workbook();
//Obtaining the reference of the newly added worksheet
Worksheet ws = workbook.Worksheets[0];
Aspose.Cells.Cells cells = ws.Cells;
//Setting the value to the cells
Aspose.Cells.Cell cell = cells["A1"];
cell.PutValue("Fruit");
cell = cells["B1"];
cell.PutValue("Count");
cell = cells["C1"];
cell.PutValue("Price");
cell = cells["A2"];
cell.PutValue("Apple");
cell = cells["A3"];
cell.PutValue("Mango");
cell = cells["A4"];
cell.PutValue("Blackberry");
cell = cells["A5"];
cell.PutValue("Cherry");
//Display the sheet tab and set the width of the tab bar
workbook.Settings.ShowTabs = true;
workbook.Settings.SheetTabBarWidth = 150;
workbook.Save("out.xlsx");

Sonuç dosyası önizlemesi: