انسخ ورقة عمل

نسخ ورقة عمل

باستخدام فهرس الورقة

يوضح رمز المثال أدناه كيفية إضافة نسخة من ورقة العمل إلى عنصر تحكم GridWeb عن طريق تحديد فهرس ورقة العمل في أسلوب AddCopy الخاص بـ GridWorksheetCollection.

// 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.

// 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");