// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java // The path to the documents directory. String dataDir = Utils.getSharedDataDir(Orientation.class) + "data/"; // Instantiating a Workbook object Workbook workbook = new Workbook(); // Accessing the added worksheet in the Excel file int sheetIndex = workbook.getWorksheets().add(); Worksheet worksheet = workbook.getWorksheets().get(sheetIndex); Cells cells = worksheet.getCells(); // Adding the current system date to "A1" cell Cell cell = cells.get("A1"); Style style = cell.getStyle(); // Adding some value to the "A1" cell cell.setValue("Visit Aspose!"); // Setting the rotation of the text (inside the cell) to 25 Style style1 = cell.getStyle(); style1.setRotationAngle(25); cell.setStyle(style1); // Saved style cell.setStyle(style1); // Saving the modified Excel file in default format workbook.save(dataDir + "Orientation_out.xls");