@Ganesh1402,
With Aspose.Slides for Java 23.11, please try using the following code example:
Presentation pres = new Presentation();
try {
pres.getSlideSize().setSize(1280, 720, SlideSizeScaleType.DoNotScale);
ITable table = pres.getSlides().get_Item(0).getShapes().addTable(25, 110, new double[] { 35, 505, 55 }, new double[] { 40, 40 });
table.get_Item(0, 0).getCellFormat().getFillFormat().setFillType(FillType.Solid);
table.get_Item(0, 0).getCellFormat().getFillFormat().getSolidFillColor().setColor(Color.WHITE);
table.get_Item(0, 0).getCellFormat().getBorderRight().setWidth(0);
table.get_Item(0, 0).getCellFormat().getBorderLeft().setWidth(0);
table.get_Item(0, 0).getCellFormat().getBorderTop().setWidth(0);
table.get_Item(0, 0).getCellFormat().getBorderBottom().setWidth(0);
table.get_Item(1, 0).getCellFormat().getFillFormat().setFillType(FillType.Solid);
table.get_Item(1, 0).getCellFormat().getFillFormat().getSolidFillColor().setColor(Color.ORANGE);
table.get_Item(1, 0).getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).setText("Team Members");
table.get_Item(1, 0).getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).getPortionFormat().setFontHeight(24);
table.get_Item(1, 0).getCellFormat().getBorderRight().setWidth(0);
table.get_Item(1, 0).getCellFormat().getBorderLeft().setWidth(0);
table.get_Item(1, 0).getCellFormat().getBorderTop().setWidth(0);
table.get_Item(1, 0).getCellFormat().getBorderBottom().setWidth(0);
table.get_Item(2, 0).getCellFormat().getFillFormat().setFillType(FillType.Solid);
table.get_Item(2, 0).getCellFormat().getFillFormat().getSolidFillColor().setColor(Color.WHITE);
table.get_Item(2, 0).getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).setText("Year");
table.get_Item(2, 0).getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).getPortionFormat().getFillFormat().setFillType(FillType.Solid);
table.get_Item(2, 0).getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).getPortionFormat().getFillFormat().getSolidFillColor().setColor(Color.BLACK);
table.get_Item(2, 0).getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).getPortionFormat().setFontBold(NullableBool.False);
table.get_Item(2, 0).getCellFormat().getBorderLeft().getFillFormat().setFillType(FillType.Solid);
table.get_Item(2, 0).getCellFormat().getBorderLeft().getFillFormat().getSolidFillColor().setColor(Color.BLUE);
table.get_Item(2, 0).getCellFormat().getBorderLeft().setWidth(4);
table.get_Item(2, 0).getCellFormat().getBorderRight().setWidth(0);
table.get_Item(2, 0).getCellFormat().getBorderTop().setWidth(0);
table.get_Item(2, 0).getCellFormat().getBorderBottom().setWidth(0);
table.get_Item(0, 1).setTextVerticalType(TextVerticalType.Vertical270);
table.get_Item(0, 1).getTextFrame().getTextFrameFormat().getTextStyle().getDefaultParagraphFormat().setAlignment(TextAlignment.Center);
table.get_Item(0, 1).getTextFrame().getParagraphs().get_Item(0).getParagraphFormat().setAlignment(TextAlignment.Center);
table.get_Item(0, 1).getTextFrame().getParagraphs().get_Item(0).setText("INDIA");
table.get_Item(0, 1).getCellFormat().getBorderRight().setWidth(0);
table.get_Item(0, 1).getCellFormat().getBorderLeft().setWidth(0);
table.get_Item(0, 1).getCellFormat().getBorderTop().setWidth(0);
table.get_Item(0, 1).getCellFormat().getBorderBottom().setWidth(0);
table.get_Item(1, 1).getCellFormat().getFillFormat().setFillType(FillType.Solid);
table.get_Item(1, 1).getCellFormat().getFillFormat().getSolidFillColor().setColor(Color.WHITE);
table.get_Item(1, 1).getCellFormat().getBorderTop().getFillFormat().setFillType(FillType.Solid);
table.get_Item(1, 1).getCellFormat().getBorderTop().getFillFormat().getSolidFillColor().setColor(Color.BLUE);
table.get_Item(1, 1).getCellFormat().getBorderTop().setWidth(1);
table.get_Item(1, 1).getCellFormat().getBorderBottom().getFillFormat().setFillType(FillType.Solid);
table.get_Item(1, 1).getCellFormat().getBorderBottom().getFillFormat().getSolidFillColor().setColor(Color.BLUE);
table.get_Item(1, 1).getCellFormat().getBorderBottom().setWidth(1);
table.get_Item(1, 1).getCellFormat().getBorderLeft().getFillFormat().setFillType(FillType.Solid);
table.get_Item(1, 1).getCellFormat().getBorderLeft().getFillFormat().getSolidFillColor().setColor(Color.BLUE);
table.get_Item(1, 1).getCellFormat().getBorderLeft().setWidth(1);
table.get_Item(1, 1).getCellFormat().getBorderRight().getFillFormat().setFillType(FillType.Solid);
table.get_Item(1, 1).getCellFormat().getBorderRight().getFillFormat().getSolidFillColor().setColor(Color.BLUE);
table.get_Item(1, 1).getCellFormat().getBorderRight().setWidth(1);
table.get_Item(1, 1).getTextFrame().getParagraphs().clear();
Paragraph p1 = new Paragraph();
p1.setText("Virat Kohli");
table.get_Item(1, 1).getTextFrame().getParagraphs().add(p1);
Paragraph p2 = new Paragraph();
p2.setText("Rohit Sharma");
table.get_Item(1, 1).getTextFrame().getParagraphs().add(p2);
Paragraph p3 = new Paragraph();
p3.setText("Shubman Gill");
table.get_Item(1, 1).getTextFrame().getParagraphs().add(p3);
table.get_Item(1, 1).getTextFrame().getParagraphs().add(new Paragraph());
table.get_Item(1, 1).getTextFrame().getParagraphs().get_Item(0).getParagraphFormat().getBullet().setType(BulletType.Symbol);
table.get_Item(1, 1).getTextFrame().getParagraphs().get_Item(1).getParagraphFormat().getBullet().setType(BulletType.Symbol);
table.get_Item(1, 1).getTextFrame().getParagraphs().get_Item(2).getParagraphFormat().getBullet().setType(BulletType.Symbol);
table.get_Item(2, 1).getCellFormat().getFillFormat().setFillType(FillType.Solid);
table.get_Item(2, 1).getCellFormat().getFillFormat().getSolidFillColor().setColor(Color.WHITE);
table.get_Item(2, 1).getCellFormat().getBorderRight().setWidth(0);
table.get_Item(2, 1).getCellFormat().getBorderLeft().setWidth(0);
table.get_Item(2, 1).getCellFormat().getBorderTop().setWidth(0);
table.get_Item(2, 1).getCellFormat().getBorderBottom().setWidth(0);
table.get_Item(2, 1).splitByHeight((table.get_Item(2, 1).getHeight() - 30) / 2);
table.get_Item(2, 2).splitByHeight(30);
table.get_Item(2, 2).getTextFrame().getParagraphs().get_Item(0).setText("2023");
table.get_Item(2, 2).getCellFormat().getFillFormat().setFillType(FillType.Solid);
table.get_Item(2, 2).getCellFormat().getFillFormat().getSolidFillColor().setColor(Color.GREEN);
pres.save("output.pdf", SaveFormat.Pdf);
} finally {
if (pres != null) pres.dispose();
}
output.pdf (37.7 KB)