Satırları ve Sütunları Sil
Contents
[
Hide
]
Bu konuda, Aspose.Cells.GridWeb API kullanılarak bir çalışma sayfasındaki satırların ve sütunların nasıl silineceği gösterilmektedir. Bu özelliğin yardımıyla, geliştiriciler çalışma zamanında satırları veya sütunları silebilir.
Satırları Silme
Çalışma sayfanızdan bir satırı silmek için:
- Aspose.Cells.GridWeb denetimini bir Web Formuna ekleyin.
- Satırlarını sildiğiniz çalışma sayfasına erişin.
- Satır dizinini belirterek çalışma sayfasından bir satırı silin.
This file contains hidden or 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ını silmek istediğiniz çalışma sayfasına erişin.
- Sütun dizinini belirterek çalışma sayfasından bir sütunu silin.
This file contains hidden or 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); |
Çalışma sayfalarına birden çok satırı/sütun silmek için DeleteRows/DeleteColumns yöntemlerini de kullanabilirsiniz.