How does one set the position and size of a new table in a powerpoint
slide using POI?  So far I have been able to create a table, set it's
data, number or of rows and columns, font size, and border, but have had
no success setting it's size or location.

The width of a table is comprised of the widths of individual columns.
For example, if you have a table with two columns and want to set the widths in 
proportion 2:1
you can use the following code:

//set width of the 1st column
 table.setColumnWidth(0, 300);
 //set width of the 2nd column
 table.setColumnWidth(1, 150);

Total width is 300+150 = 450px

To position a table in a slide use table.move(x, y)

The following code centers the table :

  int pgWidth = slideShow.getPageSize().width;
  table.moveTo((pgWidth - table.getAnchor().width)/2, 200);

See http://poi.apache.org/hslf/how-to-shapes.html#Tables

Yegor

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  • Tales in Powerpoint Robinson, Brian L. (Mission Systems)
    • Re: Tales in Powerpoint Yegor Kozlov

Reply via email to