نسخ ورقة عمل
Contents
[
Hide
]
إضافة أوراق عمل يصف كيفية إضافة أوراق العمل الجديدة إلى Aspose.Cells.GridWeb. من الممكن أيضًا إضافة نسخة (أو نسخة طبق الأصل) من صفحة العمل الأخرى إلى عنصر تحكم Aspose.Cells.GridWeb. يمكن أن تكون هذه الميزة مفيدة عندما يكون من الضروري أيضًا الحصول على بيانات متطابقة أو مشابهة في صفحة عمل أخرى. عندما يحدث ذلك ، من الأسهل نسخ صفحة عمل موجودة وإضافتها إلى Aspose.Cells.GridWeb كصفحة عمل جديدة بدلاً من إنشائها من البداية.
نسخ صفحة العمل
باستخدام فهرس الصفحة
يوضح الكود المثال أدناه كيفية إضافة نسخة من صفحة العمل إلى عنصر تحكم GridWeb عن طريق تحديد فهرس الصفحة في طريقة AddCopy لمجموعة GridWorksheetCollection.
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 | |
// Adding the copy of a worksheet to GridWeb by specifying its sheet index | |
int sheetIndex = GridWeb1.WorkSheets.AddCopy(0); |
باستخدام اسم الصفحة
يوضح الكود المثال أدناه كيفية إضافة نسخة من صفحة العمل إلى عنصر تحكم GridWeb عن طريق تحديد اسم الصفحة في طريقة AddCopy لمجموعة GridWorksheetCollection.
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 | |
// Adding the copy of a worksheet to GridWeb by specifying its sheet name | |
int sheetIndex1 = GridWeb1.WorkSheets.AddCopy("Students"); |
تعيد طريقة AddCopy فهرس الصفحة الجديدة المضافة التي يمكن استخدامها للوصول إلى مثيل الصفحة. لمزيد من التفاصيل حول كيفية الوصول إلى الصفحات ، اقرأ Worksheet Access.