ビルドインドキュメントプロパティを使用してExcelファイルの言語を指定する

可能な使用シナリオ

Excelファイルの言語を変更するには、ファイルを右クリックして [プロパティ] > [詳細] を選択し、その後 言語 フィールドを編集します。Aspose.CellsのAPIを使用してプログラムで変更するには、BuiltInDocumentPropertyCollection.Language プロパティを使用してください。

ビルドインドキュメントプロパティを使用してExcelファイルの言語を指定する

次のサンプルコードでは、ワークブックを作成し、その言語という名前のビルトインドキュメントプロパティを変更します。そのコードで生成される出力Excelファイルと、BuiltInDocumentPropertyCollection.Language プロパティによって変更された言語を示すスクリーンショットを参照してください。

todo:image_alt_text

サンプルコード

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