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