ユニオン範囲の作成
Contents
[
Hide
]
ユニオン範囲の作成
Aspose.Cellsは、WorksheetCollection.CreateUnionRangeメソッドを使用してユニオン範囲を作成する機能を提供します。WorksheetCollection.CreateUnionRangeメソッドは、ユニオン範囲を作成するためのアドレスとワークシートのインデックスの2つのパラメータを受け入れます。WorksheetCollection.CreateUnionRangeメソッドは、UnionRangeオブジェクトを返します。
下記のコードスニペットは、WorksheetCollection.CreateUnionRangeメソッドを使用してユニオン範囲を作成する方法を示しています。コードによって生成された出力ファイルは参照のために添付されています。
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-Java | |
//Source directory | |
String sourceDir = Utils.Get_SourceDirectory(); | |
//Output directory | |
String outputDir = Utils.Get_OutputDirectory(); | |
// Instantiating a Workbook object | |
Workbook workbook = new Workbook(sourceDir + "SampleChangeTickLabelDirection.xlsx"); | |
Worksheet worksheet = workbook.getWorksheets().get(0); | |
// Load the chart from source worksheet | |
Chart chart = worksheet.getCharts().get(0); | |
chart.getCategoryAxis().getTickLabels().setDirectionType(ChartTextDirectionType.HORIZONTAL); | |
// Output the file | |
workbook.save(outputDir + "outputChangeTickLabelDirection.xlsx"); |