Thank you for contacting Aspose support.
Please note that the textual values (unlike numbers) are aligned top & left by default. However, you may also achieve this with the following piece of code.
//Instantiating a Workbook object
Workbook workbook = new Workbook();
//Accessing the first worksheet in the Excel file
Worksheet worksheet = workbook.getWorksheets().get(0);
//Accessing the cells of first worksheet
Cells cells = worksheet.getCells();
//Accessing the “A1” cell from the worksheet
//Adding some value to the “A1” cell
Style style = workbook.createStyle();
//Setting the vertical alignment of the text in the “A1” cell
//Setting the horizontal alignment of the text in the “A1” cell
//Apply style onto the cell
//Saving the modified Excel file
If we have misunderstood your requirement then please share your desired results, that you may create manually using MS Excel application. Upon reviewing your desired results, we will be in a better position to mimic the same functionality using Aspose.Cells for Java API.