حذف الصفوف والأعمدة

حذف الصفوف

لحذف صف من ورقة العمل الخاصة بك:

  1. أضف تحكم Aspose.Cells.GridWeb إلى استمارة الويب.
  2. قم بالوصول إلى ورقة العمل التي تقوم بحذف الصفوف منها.
  3. حذف صف من ورقة العمل عن طريق تحديد فهرس صفه.
// 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);

حذف الأعمدة

لحذف عمود من ورقة العمل الخاصة بك:

  1. أضف تحكم Aspose.Cells.GridWeb إلى استمارة الويب.
  2. الوصول إلى ورقة العمل التي تريد حذف الأعمدة منها.
  3. حذف عمود من ورقة العمل عن طريق تحديد فهرس العمود الخاص به.
// 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);