Satır ve Sütunları Silme
Contents
[
Hide
]
Bu konu, Aspose.Cells.GridWeb API’sını kullanarak bir çalışma sayfasından satırları ve sütunları nasıl sileceğinizi gösterir. Bu özellik sayesinde geliştiriciler çalışma zamanında satırları veya sütunları silebilirler.
Satırları Silme
Çalışma sayfanızdan bir satırı silmek için:
- Aspose.Cells.GridWeb denetimini bir Web Formuna ekleyin.
- Satırları sildiğiniz çalışma sayfasına erişin.
- Satırın indisini belirterek çalışma sayfasından bir satırı silin.
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]; | |
// Get row index entered by user | |
int rowIndex = Convert.ToInt16(txtRowIndex.Text.Trim()); | |
// Delete row at specified index | |
sheet.Cells.DeleteRow(rowIndex); |
Sütunları Silme
Çalışma sayfanızdan bir sütunu silmek için:
- Aspose.Cells.GridWeb denetimini bir Web Formuna ekleyin.
- Sütunları silmek istediğiniz çalışma sayfasına erişin.
- Sütunun indisini belirterek çalışma sayfasından bir sütunu silin.
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]; | |
// Get column index entered by user | |
int columnIndex = Convert.ToInt16(txtColumnIndex.Text.Trim()); | |
// Delete column at specified index | |
sheet.Cells.DeleteColumn(columnIndex); |
Ayrıca, DeleteRows/DeleteColumns yöntemlerini kullanarak çalışma sayfalarına birden çok satır/sütun silmek de mümkündür.