Birleştir ve Ayır Cells
Contents
[
Hide
]
Aspose.Cells.GridWeb, hücreleri tek bir büyük hücrede birleştirmenizi sağlayan kullanışlı bir yardımcı program özelliğine sahiptir. Bu konu, hücrelerin program aracılığıyla nasıl birleştirileceğini açıklar.
Birleştirme Cells
Cells koleksiyonunun Merge yöntemini çağırarak bir çalışma sayfasındaki birden çok hücreyi tek bir hücrede birleştirin. Merge yöntemi çağrılırken birleştirilecek hücre aralığını belirtin.
Birden çok hücreyi birleştirirseniz ve her hücre veri içeriyorsa, birleştirmeden sonra yalnızca aralıktaki sol üst hücrenin içeriği korunur. Diğer hücrelerdeki veriler kaybolmaz. Hücreleri ayırırsanız, her hücre kendi verilerini kurtarır.
Dört hücre tek hücrede birleştirildi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Accessing the reference of the worksheet that is currently active | |
GridWorksheet sheet = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex]; | |
// Merging cells starting from the cell with 3rd row and 3rd column. | |
// 2 rows and 2 columns will be merged from the starting cell | |
sheet.Cells.Merge(2, 2, 2, 2); |
Ayrılıyor Cells
Hücreleri ayırmak için, Merge yöntemiyle aynı parametreleri alan ve hücrelerin ayrılmasını gerçekleştiren Cells koleksiyonunun UnMerge yöntemini kullanın.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Accessing the reference of the worksheet that is currently active | |
GridWorksheet sheet = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex]; | |
// Unmerging cells starting from the cell with 3rd row and 3rd column. | |
// 2 rows and 2 columns will be unmerged from the starting cell | |
sheet.Cells.UnMerge(2, 2, 2, 2); |