إضافة أو إدراج عمود في ورقة العمل
Contents
[
Hide
]
في هذا الموضوع ، سنصف الميزة الأساسية لإضافة وإدراج الأعمدة إلى ورقات العمل في وقت التشغيل باستخدام واجهة برمجة تطبيقات Aspose.Cells.GridDesktop. الفرق الأساسي بين الإضافة والإدراج هو أنه في الإضافة ، يتم إضافة العمود في نهاية مجموعة الأعمدة لورقة العمل أما في الإدراج ، يمكن إضافة العمود إلى أي موقع محدد في ورقة العمل.
إضافة عمود إلى ورقة العمل
لإضافة عمود جديد إلى ورقة العمل ، يرجى اتباع الخطوات التالية:
- أضف عنصر تحكم Aspose.Cells.GridDesktop إلى نموذجك (Form)
- الوصول إلى أي ورقة عمل مرغوبة
- إضافة Column إلى Worksheet
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 first worksheet of the Grid | |
Worksheet sheet = gridDesktop1.Worksheets[0]; | |
// Adding column to the worksheet | |
sheet.AddColumn(); |
إدراج عمود في ورقة العمل
لإدراج عمود جديد في ورقة العمل في موقع محدد ، يرجى اتباع الخطوات التالية:
- أضف عنصر تحكم Aspose.Cells.GridDesktop إلى نموذجك (Form)
- الوصول إلى أي ورقة عمل مرغوبة
- إدراج Column في Worksheet (في موضع محدد عن طريق تحديد فهرس العمود الذي تريد إدراجه فيه)
// Accessing first worksheet of the Grid
Aspose.Cells.GridDesktop.Worksheet sheet = gridDesktop1.Worksheets[0];
// Inserting column to the worksheet to the first position.
sheet.Cells.InsertColumn(0);