// Create a new workbook Workbook workbook = new Workbook(); IWorksheet worksheet = workbook.getWorksheets().get(0); IShape shape = worksheet.getShapes().addShape(AutoShapeType.Parallelogram, 1, 1, 200, 100); shape.setWidth(500); shape.setHeight(200); shape.getTextFrame().getTextRange().getFont().getColor().setRGB(Color.FromArgb(0, 255, 0)); shape.getTextFrame().getTextRange().getFont().setBold(true); shape.getTextFrame().getTextRange().getFont().setItalic(true); shape.getTextFrame().getTextRange().getFont().setSize(20); shape.getTextFrame().getTextRange().getFont().setStrikethrough(true); shape.getTextFrame().getTextRange().getParagraphs().add("This is a parallelogram shape."); shape.getTextFrame().getTextRange().getParagraphs().add("My name is XXX"); shape.getTextFrame().getTextRange().getParagraphs().get(1).getRuns().add("Hello World!"); shape.getTextFrame().getTextRange().getParagraphs().get(1).getRuns().get(0).getFont().setStrikethrough(false); shape.getTextFrame().getTextRange().getParagraphs().get(1).getRuns().get(0).getFont().setSize(35); // Save to an excel file workbook.save("SetShapeText.xlsx");