Créer une plage d'union
Contents
[
Hide
]
Créer une plage d’union
Aspose.Cells offre la possibilité de créer Union Range en utilisant leWorksheetCollection.CreateUnionRange méthode. LeWorksheetCollection.CreateUnionRange accepte deux paramètres, l’adresse pour créer la plage d’union et l’index de la feuille de calcul. LeWorksheetCollection.CreateUnionRange La méthode renvoie unGammeUnionobjet.
L’extrait de code suivant illustre la création d’une plage d’union à l’aide deWorksheetCollection.CreateUnionRange méthode. Le fichier de sortie généré par le code est joint pour référence.
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"); |