Specify the Language of the Excel File using BuiltIn Document Properties
Possible Usage Scenarios
You can change the Language of Excel file by right-clicking the file and then selecting Properties > Details and then editing the Language field. Please use BuiltInDocumentPropertyCollection.Language property to change it programmatically using Aspose.Cells APIs.
Specify the Language of the Excel File using BuiltIn Document Properties
The following sample code creates a workbook and changes its built-in document property named Language. Please see the output Excel file generated by the code and screenshot that shows the modified Language field by BuiltInDocumentPropertyCollection.Language property.
Sample Code
// 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); |