pradeep
pradeep

Reputation: 68

How to center align the table which has dynamic columns in a slide using apache poi ppt

We are generating a PPT file using apache poi 3.9. The table in the slide will have dynamic number of columns. How to center align the table in the generated file. Now, the margin is set using:

table.setAnchor(new Rectangle(50, 60, 300, 300));

Upvotes: 2

Views: 306

Answers (2)

pradeep
pradeep

Reputation: 68

The issue is resolved by calculating the table width and setting the left margin

Upvotes: 1

LOrD_ARaGOrN
LOrD_ARaGOrN

Reputation: 4496

You can calculate the table width and setting the left margin. That should fix the issue. I will check if there is any alternative.

Upvotes: 1

Related Questions