حدد لغة ملف Excel باستخدام خصائص المستند المضمنة
Contents
[
Hide
]
سيناريوهات الاستخدام الممكنة
يمكنك تغيير لغة ملف Excel بالنقر بزر الماوس الأيمن فوق الملف ثم تحديد خصائص> تفاصيل ثم تحرير حقل اللغة. الرجاء استخدامBuiltInDocumentPropertyCollection.Languageلتغييره برمجيًا باستخدام واجهات برمجة تطبيقات Aspose.Cells.
حدد لغة ملف Excel باستخدام خصائص المستند المضمنة
نموذج التعليمات البرمجية التالي بإنشاء مصنف وتغيير خاصية المستند المضمنة الخاصة به المسماة اللغة. الرجاء مراجعةإخراج ملف Excel التي تم إنشاؤها بواسطة الكود ولقطة الشاشة التي تعرض حقل اللغة المعدلة بواسطةBuiltInDocumentPropertyCollection.Languageخاصية.
عينة من الرموز
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 | |
//Create workbook object. | |
Workbook wb = new Workbook(); | |
//Access built-in document property collection. | |
Aspose.Cells.Properties.BuiltInDocumentPropertyCollection bdpc = wb.BuiltInDocumentProperties; | |
//Set the language of the Excel file. | |
bdpc.Language = "German, French"; | |
//Save the workbook in xlsx format. | |
wb.Save(outputDir + "outputSpecifyLanguageOfExcelFileUsingBuiltInDocumentProperties.xlsx", SaveFormat.Xlsx); |