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