حماية وإلغاء حماية هيكل دفتر العمل
Contents
[
Hide
]
لمنع المستخدمين الآخرين من عرض أوراق عمل مخفية، أو إضافتها، أو نقلها، أو حذفها، أو إخفاءها، أو إعادة تسميتها، يمكنك حماية هيكل دفتر العمل الخاص بك بكلمة مرور.
حماية وإلغاء حماية هيكل دفتر العمل في MS Excel
- انقر على مراجعة > حماية الدفتر. ١. أدخل كلمة مرور في مربع الكلمة السرية. ١. حدد موافق, أدخل كلمة المرور مرة أخرى لتأكيدها، ثم حدد موافق مجددًا.
حماية هيكل الدفتر باستخدام Aspose.Cell for .Net
متطلبات الترميز البسيطة التالية فقط لتنفيذ حماية هيكل دفتر العمل لملفات Excel.
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
//Create a new file. | |
Workbook workbook = new Workbook(); | |
//Protect workbook structure. | |
workbook.Protect(ProtectionType.Structure, "password"); | |
//Save Excel file. | |
workbook.Save("Book1.xlsx"); |
إلغاء حماية هيكل الدفتر باستخدام Aspose.Cell for .Net
إلغاء حماية هيكل الدفتر بسيط مع واجهة برمجة تطبيقات Aspose.Cells.
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
//Open an Excel file which workbook structure is protected. | |
Workbook workbook = new Workbook("Book1.xlsx"); | |
//Unprotect workbook structure. | |
workbook.Unprotect("password"); | |
//Save Excel file. | |
workbook.Save("Book1.xlsx"); |
ملاحظة: كلمة مرور صحيحة مطلوبة.