قم بإزالة ورقة العمل
Contents
[
Hide
]
يناقش هذا الموضوع إزالة أوراق العمل باستخدام عنصر تحكم Aspose.Cells.GridDesktop. هناك بعض الأساليب البسيطة لإنجاز هذه المهمة الأساسية.
إزالة ورقة عمل
لإزالة ورقة عمل باستخدام Aspose.Cells.GridDesktop control ، يرجى اتباع الخطوات التالية:
- قم باضافة Aspose.Cells.GridDesktop control الى نموذج.
- قم باستدعاء طريقة الإزالة الخاصة بمجموعة أوراق العمل في عنصر تحكم GridDesktop.
باستخدام فهرس ورقة العمل
في هذا النهج ، ما عليك سوى تمرير فهرس ورقة العمل (في مجموعة أوراق العمل الخاصة بالشبكة) لورقة العمل المراد إزالتها.
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 | |
// Removing a worksheet using its index | |
gridDesktop1.Worksheets.Remove(0); |
استخدام اسم ورقة العمل
إذا كان اسم ورقة العمل معروفًا ، فمن الممكن إزالة ورقة عمل معينة عن طريق تحديد اسمها.
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 | |
// Removing a worksheet using its index | |
gridDesktop1.Worksheets.RemoveAt("Sheet3"); |
الإزالة هي طريقة. استخدمها لإزالة ورقة العمل باستخدام الفهرس الخاص بها (في مجموعة أوراق العمل) أو استخدم طريقة RemoveAt لإزالة ورقة العمل باستخدام الفهرس / الاسم.