// Create a new workbook Workbook workbook = new Workbook(); IWorksheet worksheet = workbook.getWorksheets().get(0); IShape shape = worksheet.getShapes().addShape(AutoShapeType.Rectangle, worksheet.getRange("C2:E6")); shape.getTextFrame().getTextRange().add("グレープシティへようこそ"); //Set the text direction to be stacked, and the text reading order from right to left. shape.getTextFrame().setDirection(TextDirection.StackedRtl); // Save to an excel file workbook.save("SetShapeTextDirection.xlsx");
// Create a new workbook var workbook = Workbook() val worksheet = workbook.worksheets[0] val shape = worksheet.shapes.addShape(AutoShapeType.Rectangle, worksheet.getRange("C2:E6")) shape.textFrame.textRange.add("グレープシティへようこそ") //Set the text direction to be stacked, and the text reading order from right to left. shape.textFrame.direction = TextDirection.StackedRtl // Save to an excel file workbook.save("SetShapeTextDirection.xlsx")